# What operation does the following diagram depict?

+1 vote
What operation does the following diagram depict?

(a) inserting a leaf node

(b) inserting an internal node

(c) deleting a node with 0 or 1 child

(d) deleting a node with 2 children

This interesting question is from Binary Trees in section Binary Trees of Data Structures & Algorithms I

The question was asked during an internship interview.

## 1 Answer

+1 vote
by (789k points)
selected by

Best answer
The correct choice is (c) deleting a node with 0 or 1 child

The best explanation: The above diagram is a depiction of deleting a node with 0 or 1 child since the node D which has 1 child is deleted.

+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
0 votes
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer
+1 vote
1 answer