1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nadusha1986 [10]
3 years ago
7

What does it mean for a heap to be complete?

Computers and Technology
1 answer:
Dmitry [639]3 years ago
3 0

Answer:

 A complete heap is a heap in which the all the nodes are completely filled and the level of the each node are equal to each other. So, if the heap satisfied this condition then, the heap are complete.

In the computer science, heap is the special type of tree based on the data structure. Binary heap is one of the type of heap and it become complete binary tree when, it satisfied the ordering of heap property.

There are basically two types of heap ordering that are:

1) MAX heap property: In the max heap ordering property each node are less than or equal to its parent node value.

2) MIN heap property: In the min heap property each node is greater and equal to its particular parent value.

You might be interested in
5. Are you more honest in your online communication? Explain your response.
Sati [7]
Multiple research has been conducted with regards to this point of view, but the common conclusion is that it depends more on the platform. People tend to be more dishonest when not comfortable and when given the chance live off their fantasy even for short while online. We all do agree that an example is the social media where in order to get attention we only share positive things. You might want to check speaker Simon Sinek and see rich views and in depth understanding of how technology has changed us.
5 0
3 years ago
How are water resources and air adversely affected by environmental degardation?​
Nonamiya [84]

Answer:

Environmental degradation is one of the ten threats officially cautioned by the High-level Panel on Threats, Challenges and Change of the United Nations. The United Nations International Strategy for Disaster Reduction defines environmental degradation as "the reduction of the capacity of the environment to meet social and ecological objectives, and needs".[4] Environmental degradation comes in many types. When natural habitats are destroyed or natural resources are depleted, the environment is degraded. Efforts to counteract this problem include environmental protection and environmental resources management.

There are many examples of environmental degradation throughout the world. A recent example is the 2019 Amazon rainforest wildfires. The Amazon makes up 60% of all rainforests. It is the earth's lungs and with it getting destroyed is posing a huge threat to the environment and the whole world. The effects of the deforestation will pose major impacts on the world around us. The constant cutting down of trees is getting rid of our oxygen supply as well as the absorption of co2. With the continuation of deforestation we will have less available oxygen in the world which could have detrimental effects on human health. An alternate issue that results from this is the overconsumption and waste of the paper products that come from those trees. The waste it typically produces does not get recycled, therefore, immense amount of waste is created. An additional harmful result from this is the degradation of the soil. The constant deforestation causes the soil to become less nutrient which will make it harder to be used again.

Explanation:

Environmental degradation is one of the ten threats officially cautioned by the High-level Panel on Threats, Challenges and Change of the United Nations. The United Nations International Strategy for Disaster Reduction defines environmental degradation as "the reduction of the capacity of the environment to meet social and ecological objectives, and needs".[4] Environmental degradation comes in many types. When natural habitats are destroyed or natural resources are depleted, the environment is degraded. Efforts to counteract this problem include environmental protection and environmental resources management.

There are many examples of environmental degradation throughout the world. A recent example is the 2019 Amazon rainforest wildfires. The Amazon makes up 60% of all rainforests. It is the earth's lungs and with it getting destroyed is posing a huge threat to the environment and the whole world. The effects of the deforestation will pose major impacts on the world around us. The constant cutting down of trees is getting rid of our oxygen supply as well as the absorption of co2. With the continuation of deforestation we will have less available oxygen in the world which could have detrimental effects on human health. An alternate issue that results from this is the overconsumption and waste of the paper products that come from those trees. The waste it typically produces does not get recycled, therefore, immense amount of waste is created. An additional harmful result from this is the degradation of the soil. The constant deforestation causes the soil to become less nutrient which will make it harder to be used again.

4 0
3 years ago
Write a function named print_backward that accepts a String as its parameter and prints the characters in the opposite order. Fo
noname [10]

Answer:

Here is the JavaScript code:

function print_backward(string) {

   var revString = "";

   for (var i = string.length - 1; i >= 0; i--) {

       revString += string[i];  }

   return revString; }

document.write(print_backward("hello there!"))

Explanation:

The function print_backward takes a string as a parameter.

Then it creates a new variable revString to hold a resultant string in opposite order.

The loop iterates through the characters of given string parameter in reverse and adds each character of the string to revString in opposite order.

Then the function returns revString which is the string in opposite order.

document.write(print_backward("hello there!")) This statement calls print_backward method passing a string hello there! to the method in order to print/display the characters of string in opposite order.

Lets say the string is hello

Then the loop works as follows:

The variable i is initialized to string.length - 1

string.length returns the length of the string

The length of string is 5 as there are 5 characters in string hello.

Hence string.length - 1 = 5 -1 = 4. So i=4

The loop checks if the value of i is greater than or equals to 0. This is true because i=4

Then the program enters the body of the loop which has a statement:

revString += string[i]; this works as:

revString = revString + string[i];

As i = 4 So

At first iteration

revString = revString + string[4];

This means the last character of string hello is added to revString. The last character of hello is 'o'

revString = 'o'

The statement in loop body continues to execute and stops when the value of i becomes less than 0.

The value of is decremented by 1 i.e. i-- So i = 3

At second iteration

revString = revString + string[3];

This means the second from last character of string hello is added to revString. The second last character of hello is 'l'

revString = 'ol'

The value of is decremented by 1 i.e. i-- So i = 2

At third iteration

revString = revString + string[2];

This means the third from last character of string hello is added to revString. The third last character of hello is 'l'

revString = 'oll'

The value of is decremented by 1 i.e. i-- So i = 1

At fourth iteration

revString = revString + string[1];

This means the fourth from last character of string hello is added to revString. The fourth last character of hello is 'e'

revString = 'olle'

The value of is decremented by 1 i.e. i-- So i = 0

At fifth iteration

revString = revString + string[0];

This means the fifth from last character of string hello is added to revString. The fifth last character of hello is 'e'

revString = 'olleh'

The value of is decremented by 1 i.e. i-- and the loop breaks because the i>=0 evaluates to false.

So the program moves to the next statement:

return revString;

revString = 'olleh' is returned and the statement document.write(print_backward("hello")) prints olleh on output screen.

In the given example the string is hello there! So this works same like the explained example and prints the following output on screen:

Output:

!ereht olleh

3 0
3 years ago
The computer that is used in scientific research is ........​
MrRa [10]

Answer:

supercomputers are the computer that is used in scientific research.

6 0
3 years ago
Its made up of a small memory chips on a card that can hold data in an electronic format​
valina [46]

The chip can allow you to have more data and more pictures so your phone does not become slow and messages and apps and more.

4 0
3 years ago
Other questions:
  • What was the purpose of the Declaration of Independence and what led to it​
    10·1 answer
  • Given non-negative integers x and n, x taken to the nth power can be defined as: x to the 0th power is 1 x to the nth power can
    7·1 answer
  • For a typically large organization how many dns servers should you install
    5·1 answer
  • Kellyn needs to move Slide 8 of his presentation up so that it becomes Slide 6. What best describes how he can do this using the
    13·1 answer
  • What does the Chart Elements option allow you to change? A. Values B. Color C. Style D. Axis titles
    13·1 answer
  • In a ______topology, every device has exactly two neighbors for communication purposes. A failure in any cable or device can tak
    15·2 answers
  • It's fill the gap homework
    7·1 answer
  • 10010 - 1011 binary subtraction​
    5·1 answer
  • What is the correct name for the words Home, Insert, Design, Layout, References, etc. in the ribbon in Word 2016?
    7·1 answer
  • If the fluid level in a battery is below the separators<br> should be added but never add
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!