Concept Flow - Floor and Ceil in BST
Start at root
Compare key with current node
Floor = Ceil = node value
→Done
Go to left subtree
Record node value as potential floor
Go to right subtree
Repeat until no more nodes
Return recorded floor or ceil value
Start at the root and compare the key with current node value. Move left if key is smaller, move right if key is larger, updating floor or ceil candidates until traversal ends.