Meta Interview Question

Leetcode tree based medium coding question