Write a Depth First Search Algorithm for Graphs in JavaScript

Share this video with your friends

Send Tweet

Depth first search is a graph search algorithm that starts at one node and uses recursion to travel as deeply down a path of neighboring nodes as possible, before coming back up and trying other paths.

Haroen Viaene
Haroen Viaene
~ 6 years ago

I think that in the video the explore callback should be called outside of the function itself right (one line lower). It’s correct in the sandbox :). Great course by the way!

Gus Saiani
Gus Saiani
~ 5 years ago
~ 2 years ago

Yeah Haroen Viaene was right. Video should be changed or should be given a tip in the video itself.