4 ms·
To be fair, almost all the problems after 6 are just variations on BFS and DFS, just different ways to ask the question. For example, (11. Check if an undirect
by awesomepantsm 10y ago
To be fair, almost all the problems after 6 are just variations on BFS and DFS, just different ways to ask the question.
For example, (11. Check if an undirected graph contains cycle or not) can easily be solved by just performing a DFS with some exit conditions.