Meta Interview Question

a leetcode question about binary tree.