We are given two nxn boards one representing the starting configuration and the other representing the ending configuration.
We are also given K, the maximum number of steps in which we want to reach the ending configuration from the starting configuration.
- The boards have an empty cell represented by 0 and all other cells are filled.
- In one move/step you can swap the empty cell with any adjacent (horizontally/vertically) filled cell.
- We have to decide if it is possible to reach the ending configuration from the starting configuration in atmost K moves.