edited by
3,638 views

3 Answers

Best answer
21 votes
21 votes

Since the given binary tree is a min-heap tree.

  • First swap $27$ and $5$
  • Then delete $5$
  • Apply min-heapify

And structure will be:

 

edited by
0 votes
0 votes

Assuming that we have stored this heap in an array structure, Procedure: 

  • Search for element $5$ using the sequential search in the array.
  • Swap it with the last element, in this case, $27.$
  • Bubble down it so that the min-heap property is satisfied.
reshown by

Related questions

3.1k
views
2 answers
31 votes
Akash Kanase asked Apr 18, 2016
3,120 views
Consider the binary tree in the figure below:Outline a procedure in Pseudo-code to delete an arbitrary node from such a binary tree with $n$ nodes that preserves the stru...
4.5k
views
3 answers
25 votes
Kathleen asked Sep 12, 2014
4,480 views
Consider the binary tree in the figure below:What structure is represented by the binary tree?
13.9k
views
2 answers
44 votes
Kathleen asked Sep 12, 2014
13,896 views
The weighted external path length of the binary tree in figure is ______
5.6k
views
5 answers
20 votes
Kathleen asked Sep 12, 2014
5,587 views
If the binary tree in figure is traversed in inorder, then the order in which the nodes will be visited is ______