Computer Science, asked by ambccbjcgh12, 9 months ago

coursara
Consider a complete binary tree represented by an array [19,14,28,15,16,7,27,15,21,21,5,2].

How many edges of this tree violate the max-heap property? In other words, for how many edges of the tree, the parent value is smaller than the value of the child?

Answers

Answered by ıtʑFᴇᴇʟɓᴇãᴛ
2

3-ary max heap is like a binary max heap, but instead of 2 children, nodes have 3 children. A 3-ary heap can be represented by an array as follows: The root is stored in the first location, a[0], nodes in the next level, from left to right, is stored from a[1] to a[3]. The nodes from the second level of the tree from left to right are stored from a[4] location onward. An item x can be inserted into a 3-ary heap containing n items by placing x in the location a[n] and pushing it up the tree to satisfy the heap property. Which one of the following

Answered by Anonymous
0

Answer:

केस ऑफ हिस्ट्री वायलेट का मैक्स प्रॉपर्टी ऑफ पैरेंट मैन्यू स्मॉलर देन वैल्यू ऑफ चाइल्ड

Similar questions