Consider the binary tree in Figure: (a) What structure is represented by the…

PYQ GATE 1991

Consider the binary tree in Figure:

(a) What structure is represented by the binary tree?

(b) Give the different steps for deleting the node with key 5 so that the structure is preserved.

(c) Outline a procedure in pseudo-code to delete an arbitrary node from such a binary tree with n nodes that preserves the structure. What is the worst-case time-complexity of your procedure?

Min-heap tree: root 1; children 5 and 18; children of 5 are 7 and 13; children of 18 are 25 and 20; children of 7 are 11 and 9; children of 13 are 15 and 17; child of 25 is 27.

Attempted by 2 students.

Sign up free to check your answer

Sign up free

Explore the full course: Data Structures

Loading lesson…