Meta interview question

A leetcode question on binary tree