Meta interview question

A binary tree traversal question in the leetcode top 50 for Meta.