dfs recursion meaning !

Правка en1, от chinesecoder, 2019-01-12 00:22:59

suppose we are doing dfs on tree .

Your code here...

dfs(int current ,  int parent)
{
     for(auto child : v[current]
    {
        if(child == parent) continue ;
        dfs(child , current);
         code...
       what happens when we write something here. 
        
}
code .... 
And what happens when we write something here ... 

}

what are the difference between two above .

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский chinesecoder 2019-01-12 00:36:47 66
en1 Английский chinesecoder 2019-01-12 00:22:59 445 Initial revision (published)