GitHub Sponsors
Sponsor-only
Nodes and the Visitor pattern

Breadth-first search

Episode 4
3 years ago
4 min read

We've already seen a lot of techniques to apply to our visitors but this series wouldn't be complete without mentioning breadth-first search (BFS).

All of the examples we've used so far in this series have been implemented using what we call depth-first search (DFS).

If you remember, in the first episode, we mentioned that the

This content is for GitHub Sponsors only

Sponsor me on GitHub to read this article and get access to the full library of sponsor-only posts.

GitHub Sponsors
Become a Sponsor

Once you're a sponsor, login with your GitHub account to unlock immediate access to all perks!

Already have an account? Click here to login.