Concept Flow - BST Inorder Predecessor
Start at root node
Search for target node
Found target node?
No→Return None
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 that ancestor as predecessor
Done
Start from root to find the target node. If it has a left child, predecessor is the rightmost node in left subtree. Otherwise, move up to find the ancestor where target is in right subtree.