Amazon Interview Question

Rotten oranges and LCA of Binary Tree