edited by
3,451 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

31 votes
31 votes
2 answers
1
Akash Kanase asked Apr 18, 2016
2,950 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...
25 votes
25 votes
3 answers
2
Kathleen asked Sep 12, 2014
4,248 views
Consider the binary tree in the figure below:What structure is represented by the binary tree?
44 votes
44 votes
2 answers
3
Kathleen asked Sep 12, 2014
13,563 views
The weighted external path length of the binary tree in figure is ______
20 votes
20 votes
5 answers
4
Kathleen asked Sep 12, 2014
5,374 views
If the binary tree in figure is traversed in inorder, then the order in which the nodes will be visited is ______