EvergreenTree97 / Rokorithm

💪 1 부터 시작하는 알고리즘
0 stars 0 forks source link

1520 내리막 길 #23

Open EvergreenTree97 opened 2 years ago

EvergreenTree97 commented 2 years ago

dfs, 알고리즘 시작하기 얼마 안됐을 때 못풀었던 문제 다시 도전합니다..

EvergreenTree97 commented 2 years ago

메모이제이션 + dfs, visited는 필요 없었다.. 어차피 dp로 메모이제이션 할거니까 길이 없는 경우와, 벽인 경우를 구분하기 위해 -1로 초기화해서 길을 0으로 열어줘야했다.. 여전히 어렵네 왜