00:01
In this question here, so here heap is data structure that is shaped like a tree.
00:08
So it is complete binary tree that satisfy the heap property.
00:12
So here here heap can be of two type max heap and minimum heap.
00:33
So here so here the element in the priority queue are arranged in ascending order that is 53, 76 is 44, 1, 1, 10, 1, 0, 6 is 43 and this is 42 that is 1, 2, 3, 4, 5.
01:06
So the corresponding minimum have his priority queue is this.
01:10
Now here the heap start at element 1 and hence the element at 0 is null.
01:19
So here the first question is in this what is the value of the root? so here since the heap start at element 1 so the value at the root is 42.
01:50
So this is our answer for a part.
01:53
Now in b part what is the height of heap? so here the height of heap is defined as the maximum number of edge that are required to travel from the root node to any leaf node.
02:05
So here the traverse traverse the traverse from the root node from the root node 42 to the leaf root node to the leaf node is 1, 1, 0.
02:40
So here a total 2 of total of 2 edges need to be transferred and hence the height of heap is 2...