Domanda di colloquio di Apple

How to find the parent node for two nodes in a randomly generated binary tree.