Meta Interview Question

Complete a tree type problem.