Concept Flow - BST Inorder Predecessor
Start at root node
Find node with given key
Does node have left child?
No→Go up to parent until node is right child
|Yes
Go to left child
Go to rightmost node in left subtree
This node is inorder predecessor
Return predecessor value
Find the node, then if it has a left child, go left once and then right as far as possible. Otherwise, move up to find the nearest ancestor where the node is in the right subtree.
