It has been months, I've not able to think of any solution to solve this problem "Component Tree".
As this is Gym Problem, I'm not able to look for the solutions. It would be a great help if someone can provide me with the hints to solve the problem.
Thanks :)