DEV Community

Jonathan Powell
Jonathan Powell

Posted on

2 2

Writing a simple version of Breadth First Search in Javascript

Breadth First Search is one of those top 10 algorithms to know for an interview. Here it is in javascript. This code works if you're using an adjacency list to represent your graph.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay