25.24 Merge Two BSTs

#1

After we convert A and B to the linked lists, why are we nulling out these fields?
A.left.right = null;
B.left.right = null;

A.left = null;
B.left = null

Shouldn’t A.left and B.left already be pointing to null? They’re the heads of the linked list.

0 Likes