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]
4 years ago
7

What does it mean for a heap to be complete?

Computers and Technology
1 answer:
Dmitry [639]4 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
How do i add a blog to my wordpress site?
jek_recluse [69]
From the Dashboard, choose Pages→Add New                                             Type a name for the page in the text box toward the top of the page.     <span>Leave the text box blank.
</span>



5 0
3 years ago
How do you use the Internet? Think about your typical day. When are you using the Internet? For what purposes? What role does it
Basile [38]

Answer:

I use the internet for a variety of activities. In a typical day, I'd use the internet to do the following:

  1. I check my email
  2. follow the latest trends and news on popular social media channels
  3. communicate with friends, family and clients via social media channels
  4. I research business topics
  5. I use it for my work as a management consultant

The internet is now a primary utility. I currently spend more on internet data subscription than on fuel, electricity, phone call credit, and even water. It now has a tremendous impact on my daily life.

Cheers

5 0
3 years ago
Implement the function is_maxheap which takes a list of integers and returns True if the list represents a valid max-heap, and F
harkovskaia [24]

Answer:

I am writing a Python function:

def is_maxheap(list):

   #finds the length of the list  

   size=len(list)

   #loop has a variable i which starts traversing from root til end of last #internal node

   for i in range(int((size - 2) / 2) + 1):  

       if list[2 * i + 1] > list[i]:  #If left child is greater than its parent then return #false  

               return False  

       if (2 * i + 2 < size and

           list[2 * i + 2] > list[i]):    #checks if right child is greater, if yes then #returns false  

               return False

   return True

Explanation:

The function is_maxheap() traverses through all the internal nodes of the list iteratively. While traversing it checks if the  node is greater than its children or not. To check the working of this function you can write a main() function to check the working on a given list. The main() function has a list of integers. It then calls is_maxheap() method by passing that list to the function. The program displays a message: "valid max heap" if the list represents valid max-heap otherwise it returns invalid max heap.

def main():

   list = [10,7,8]  

   size = len(list)  

   if is_maxheap(list):

       print("Valid Max Heap")  

   else:  

       print("Invalid Max Heap")          

main()

The program along with its output is attached in a screenshot.

5 0
4 years ago
Date Underline the correct answer from the options. 1. How many basic input devices does a desktop computer have? .. a)2 b)3 c)
taurus [48]

Answer:

1. 3

2. D (Input Device)

3. B (File)

4. C (Microphone

7 0
2 years ago
Which font is most suitable for an academic article on a website? Which is most suitable for casual information?
CaHeK987 [17]

There are thousands of fonts, there is no clear answer of what is best for ___ website or ___ page. It's all what you think looks good and sometimes depends on the colors on the site.

4 0
3 years ago
Read 2 more answers
Other questions:
  • Let K(x, y) denote the statement "x knows y" and D denote the domain of all people. Express the following English sentences as a
    9·1 answer
  • The English (or Shakespearean) sonnet form includes three quatrains and a couplet two quatrains and a couplet two quatrains and
    15·1 answer
  • Banking, insurance, telecommunications, and education are examples of the type of knowledge industry that A. has information as
    12·2 answers
  • Instructions:Select the correct answer.
    9·1 answer
  • Assume that PrecinctReport is a structured type with these fields, address (a string), and three int fields which are counts of
    9·1 answer
  • John Cleaver is the CEO of Tech World, which is a retail store that sells computers, monitors, cameras, televisions and many oth
    6·1 answer
  • How does video conferencing change the way we work today?
    6·1 answer
  • When you evaluate the use of digital media, how has it affected the newspaper business? The rise of digital media has caused new
    15·1 answer
  • You're expecting visitors who will be demanding Mamet access Before they arrive, you can activate a Guest network that has its o
    11·1 answer
  • you need a storage device that has very large storage capacity, is fast, and is relatively inexpensive. which storage device wil
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!