Блог пользователя myaw

Автор myaw, 11 лет назад, По-английски

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

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +5 Проголосовать: не нравится
»
11 лет назад, скрыть # |
 
Проголосовать: нравится -25 Проголосовать: не нравится

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

»
11 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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.

»
11 лет назад, скрыть # |
Rev. 5  
Проголосовать: нравится +8 Проголосовать: не нравится

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