Bottom tree view

i think my logic is clear but not passes test cases