Introduction
Lesson 1 of 9 in Coddy's Depth-First Search - Graph Algorithms course.
Welcome to the Graph Algorithms series! A graph is a set of vertices connected by edges, and it models everything from road maps to social networks.
We start with Depth-First Search (DFS), one of the two fundamental ways to explore a graph. DFS dives as deep as possible along each branch before backing up and trying another.
Throughout this series a graph is given to you as:
n- the number of vertices, labeled0ton - 1.edges- a flat array where each consecutive pair is an undirected edge:[u0, v0, u1, v1, ...].
This course will include theory, an implementation you build yourself, and practice challenges. Let's get started!
Try it yourself
This lesson doesn't include a code challenge.
This lesson includes a short quiz. Start the lesson to answer it and track your progress.