Write a Depth First Search Algorithm for Graphs in JavaScript

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

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