Question d’entretien chez Apple

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