Bottom tree view

I think my logic is clear but not passes test cases