Amazon interview question

Leetcode hard problem on trees.