If any one could explain or give me a good tutorial (c++) to understand the approach of dfs . thanks.

# | User | Rating |
---|---|---|

1 | tourist | 3544 |

2 | wxhtxdy | 3411 |

3 | Radewoosh | 3386 |

4 | Benq | 3368 |

5 | mnbvmar | 3280 |

6 | ecnerwala | 3278 |

7 | LHiC | 3276 |

8 | sunset | 3264 |

9 | yutaka1999 | 3190 |

10 | maroonrk | 3183 |

# | User | Contrib. |
---|---|---|

1 | Errichto | 190 |

2 | Radewoosh | 177 |

3 | tourist | 173 |

4 | antontrygubO_o | 171 |

5 | Vovuh | 166 |

5 | PikMike | 166 |

7 | rng_58 | 159 |

8 | majk | 156 |

9 | farmersrice | 153 |

9 | Um_nik | 153 |

If any one could explain or give me a good tutorial (c++) to understand the approach of dfs . thanks.

↑

↓

Codeforces (c) Copyright 2010-2019 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/05/2019 19:02:28 (h2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|

You can go through: First:http://codeforces.com/blog/entry/16221

Second:http://codeforces.com/blog/entry/3075

Good link

I think you are not smart enough to understand dfs. No matter how hard you try , you will not achieve it. Damn it bro!!

Тролль

Well.. guess you are not smart enough to understand segment trees no matter how hard you try. Damn it bro.

Dfs=Depth first search. That means that dfs algorithm is an algorithm that search through nodes. For example lets imagine a tree as A->B, A->C, C->D, C->F. If we start from node A,then dfs logic follows this path: A-C-F-D-B. This logic can help us a lot when we work with objects that are connected,and much more stuffs.

I advice you for more information to check some youtube videos,to undestand the basic logic,after check some sources(dfs with recursion or stack),and finally solve as much problem you can.

DFS is quite interesting topic. It's Dead First Search, we look for dead men first.

here is good explanation for DFS algorithm. Depth first search in java