The 8-puzzle is a classic sliding puzzle that consists of a 3x3 grid with eight numbered tiles and one empty space. The goal of the puzzle is to rearrange the tiles by sliding them into the empty space, aiming to achieve a specific configuration, typically with the numbers arranged in ascending order.
Breadth-First Search (BFS) and Depth-First Search (DFS) are two fundamental algorithms used for traversing or searching graph and tree data structures.
Input matrix: 1 2 3 0 4 6 7 5 8
Depth: 3 Nodes count: 8
Depth: 11 Nodes count: 12