Review: BFS Problems

BFS is extremely useful. You may not imagine.

Here we try to compile a list of inspiring BFS problems.



  1. BFS in string: Letter Case Permutation
  2. Distance with power: Cheapest Flights Within K Stops
  3. Revisit seen nodes: Knight Probability in Chessboard
  4. BFS with heap: Movie Network
  5. For seen set use array, instead of a set: Is Graph Bipartite
  6. Scan from target to original: Reach a Number
  7. BFS with memorization: Target Sum

See all bfs problems: #bfs

See more blog_posts.

#+BEGIN_EXPORT HTML
<div style=”overflow: hidden;”>
<div style=”float: left; padding: 5px”> <a href=”https://www.linkedin.com/in/dennyzhang001“><img src=”linkedin.png” alt=”linkedin” /></a></div>
<div style=”float: left; padding: 5px”><a href=”https://github.com/DennyZhang“><img src=”github.png” alt=”github” /></a></div>
<div style=”float: left; padding: 5px”><a href=”https://www.dennyzhang.com/slack” target=”_blank” rel=”nofollow”><img src=”slack.png” alt=”slack”/></a></div>
</div>
#+END_EXPORTo


Share It, If You Like It.

Leave a Reply

Your email address will not be published.