doubt in implementation of DFS

Правка en1, от ss_96, 2017-09-19 22:22:57

I was trying to solve a simple DFS question and my code was not passing 2 test cases.

Question:link The solution is also given in the first comment of the problem. Can anyone please explain why the check variable is used in that code.

Thanks.

Теги c++, dfs, graph

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ss_96 2017-09-19 22:22:57 413 Initial revision (published)