Talk Python To Me cover image

#211: Classic CS problems in Python

Talk Python To Me

00:00

How to Traverse a Maze Using a Priority Cue

Maze traversal is an awesome way of kind of illustrating the difference between depth first search and breath first search. Instead of just dumbly saying, what are the next things next to where i am right now? Let's instead say, looking at my next possibilities, which one do i think will get me closest to the goal? And so we can then put all those next nodes into the priority cue, ordered by how long is that line. How long that line is is what the priority is. And we just take the ones out that have the shortest lines next. That gets us to an algorithm that will actually get us very efficiently from the start to the goal.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app