bigmachine-io / mission-interview

Code and Issues for Mission: Interview Production
4 stars 1 forks source link

Breadth First Traversal Issue in Video #5

Open tad opened 6 years ago

tad commented 6 years ago

In the algorithms video, at 15:22, the output you're showing (and from running your code) doesn't match your diagram at all.

The bottom line matches your diagram, but the next to bottom line is reversed. Looking at your diagram, I would expect 350 to come after the second 500, but instead it's 400, followed by 450.

It's as though you switched direction after the third line.

Once I get more experience with this type of code, I'll take a stab at correcting it, but you may want to update the code or diagram so others won't be confused.