Concept Flow - BST Inorder Predecessor
Start at root node
Find node with given key
Does node have left child?
No→Go up to ancestors
Find ancestor where node is in right subtree
Go to left child
Go to rightmost node in left subtree
This node is inorder predecessor
Done
To find the inorder predecessor, first find the node. If it has a left child, go to that left subtree and find its rightmost node. Otherwise, move up ancestors until you find a node that is a right child of its parent.