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.

<div style=”overflow: hidden;”>
<div style=”float: left; padding: 5px”> <a href=”“><img src=”linkedin.png” alt=”linkedin” /></a></div>
<div style=”float: left; padding: 5px”><a href=”“><img src=”github.png” alt=”github” /></a></div>
<div style=”float: left; padding: 5px”><a href=”” target=”_blank” rel=”nofollow”><img src=”slack.png” alt=”slack”/></a></div>

Share It, If You Like It.

Leave a Reply

Your email address will not be published.