Deep First Search (0)

Правка en2, от azhar556, 2018-11-01 22:45:07

Hi, I just solved my first dfs problem 1020B - Badge. Honestly i've never solve dfs before and i was thinking very long to understand this, this is very new for me. Summary, dfs in this problem is basically searching the one who visited twice and then break, and repeat several times depend the "n". This is my submission 45184407, in my submission i was trying to separate my dfs function to make easier to debug this and to make easier to read. One thing make me confused on this problem is the sequence is starting with one(1). Usually i starting with zero(0), but in this case its hard to implementing because the array input is based with one(1) too. Then to make easy i starting with one(1).

(newbie 996)

Теги dfs and similar

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский azhar556 2018-11-01 22:45:07 2 Tiny change: 'ne(1).\n\nnewbie (996) ' -> 'ne(1).\n\n(newbie 996) '
en1 Английский azhar556 2018-11-01 22:44:04 754 Initial revision (published)