Help needed in Graph ds

*Which all topics should I learn in graph ds to solve problems of div 2 challenges? I am a beginner in graph ds and cp in general . Please help.

1 Like

In the last contest the only thing that was needed in div2 graph problem was fenwick tree so I suggest u learn that and Segment tree.

1 Like

BFS and DFS are most commonly used techniques in lot’s of problems ; P

1 Like

I know BFS and DFS but I just don’t know where to apply them! Where can I get some good problems to practise them?

BFS is used when you need to find the shortest distance to reach a particular state when all the weights are same or not given.

While DFS is mainly used to solve maze ptoblems (commonly named as flood fill) ; P

1 Like

Okay thanks for the help:smiley : D