how to remove a node with key k in a binary search tree? Assumption 1: that node has only maximum one child. Assumption 2: that node is n which is having key k.

if n has no children, detach it from its parent.

if n has one child, move n's child up to take n's place.

both option 1 and 2 are correct.

both option 1 and 2 are reversed.

if n has no children, detach it from its parent. if n has one child, move n's child up to take n's place.

Back To Top