Google Cloud Interview Question

Leetcode question about binary tree