how to solve questions related to trees ?

can anyone tell me from where i should study to solve questions related to trees and graphs ???

As a beginner you can start with Geeksforgeeks, it has large sum of question on trees and graphs, once you read them and got some confidence try to solve codechef practice questions with tags trees and graphs.

Happy Coding :slight_smile:

You need to know atleast recursion and vectors. I suggest you to follow tutorials at once you do recursion and vectors. That will be enough to get you into the flow.

EDIT : Just saw tags, its dp + trees? I think if you are looking for dp and trees, then this should help

thanks alot!!

thaks bro!!

Hey @sumitskj,

How to start with trees and graph, I assume that you are a complete beginner. See the order is important to learn trees and graphs, you should follow tutorials from mycodeschool. To know trees and graphs basic data structure is really important. Start with the linked list, queue, stack, structure and how to represent graph and tree and you should proceed on with going towards algorithms based on graphs.

Practice on hackerearth topic wise and if you get doubt in understanding anything search on google the problem and add geeksforgeeks there. You’ll definitely find an apt section where your problem has been addressed or explained clearly.

For practice, i would suggest you go on hackerearth , their practice section is very informative and easy to learn tutorials.

Hope this helps!