Write a Depth First Search Algorithm for Graphs in JavaScript

Kyle Shevlin
InstructorKyle Shevlin

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
~ 3 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
~ a year ago