Wingify Interview Question

Binary tree