Alibaba Group Interview Question

Medium Leetcode Question. Binary tree