I am seeking help in understanding Binary search tree removals when a node has two children.
What I know is that when a BST node to be removed has two children, one can find either the smallest value starting from the right subtree or the largest value from the left subtree.
Which subtree should I traverse by default- should I use the right or left subtree ? Under what conditions should I pick the left/right subtree? How much does this choice matter?
Please bear with me, as I'm a newbie to DS and algos.