Concept Flow - BST Inorder Predecessor
Start at root node
Search for target node
Found target node?
No→Return null (no predecessor)
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
Find the node before the target in sorted order by checking left subtree or ancestors.
