Graphs are everywhere, and BFS is a great way to traverse/search for a node in wide graphs. When you believe what you are looking for is not very deep in the graph, Breadth First Search is your best tool.
Learn back-end development - www.boot.dev/
Learn Data Structures - www.boot.dev/courses/learn-data-structures
Like & subscribe for the algo if you enjoyed the video!
Timestamps:
00:00 - Intro
00:30 - Algorithm
01:30 - Big O
02:00 - When to use
03:02 - Outro
コメント