Oleksii Trekhleb | Javascript algorithms (Breadth-first search)
This is a series of books diving deep into the core mechanisms of the JavaScript language.
· 1 phút đọc.
Breadth-first search (BFS) is an algorithm for traversing, searching tree, or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a ‘search key’) and explores the neighbor nodes first, before moving to the next level neighbors.