1 min to read
Breadth first search
Tìm kiếm them chiều ngang.
The nature of the BFS theorem is actually recursive deduction.
Assume we have a checkerboard, on which there is a chess piece, and the piece can jump between the squares. Denote the degree of piece's initial square as 0. Then, the degree \(n+1\) squares are those which the piece can jump directly to if it was standing on a degree \(n\) square.
1. The difference between the degree of 2 adjacent square is \(1\).
2. Remember only use this algorithm for moves that go further from the initial square. In other words, do not jump back to a numbered tile!
Comments