Concept Flow - BST Inorder Predecessor
Start at root node
Search for target node
Found target node?
No→Return NULL
Yes
Does target have left child?
Yes→Go to left child
Go to rightmost node in left subtree
Go up to ancestor where target is in right subtree
Return found predecessor node
Done
Find the inorder predecessor of a node in a BST by searching the node, then either going to the rightmost node in its left subtree or moving up to the ancestor where the node is in the right subtree.
