Domanda di colloquio di Amazon

Question based on LCA of a binary tree