Apple Interview Question

Tree Implementation