From the course: Python Data Structures and Algorithms

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Challenge: Trace the path of a depth-first search

Challenge: Trace the path of a depth-first search - Python Tutorial

From the course: Python Data Structures and Algorithms

Challenge: Trace the path of a depth-first search

(upbeat music) - [Instructor] In this challenge, we ask you to trace the path of the DFS algorithm from the start position to the goal position, as shown on the screen. So the start position is in blue and the goal position is in green. A whiteboard is a great tool for doing this, as you can easily erase and update your working as you follow the algorithm. Pencil and paper also works fine, too, or you can use the grid tracer app that we looked at previously. In order to ensure you get the same results as me, make sure you push items onto the stack in a clockwise direction, starting from up, or north. We're not considering diagonals in this course. this challenge should take approximately 10 to 15 minutes to complete.

Contents