PLz Tell me how can I become good in tress and graphs?

Recently I have started doing CodeChef contests and I have noted that I am getting stuck in trees and graphs problems. It would be great if you all can guide me on how to become good at it. I can do tree and graph transversal but if the question is very different from that then I get stuck.

plz, suggest to me how to improve them.

1 Like

Pick some problems tagged with Trees or Graph and try to solve it. If you are stuck check the editorial or other solution on the approach. This way you can learn how you can apply BFS/DFS approach to solve some complex problem. Keep practicing.

1 Like

though iā€™m not so expert in trees and graphs but,
i recommend you to watch CODE N CODE channel on youtube for theory and then practice question on graph from hackerearth bcoz for practising it is good it has got variety(easy,med,hard).

You can try this https://leetcode.com/tag/tree/. Very good collection of problems on Trees.