The questions, is two write a function to find minimum number of required steps (moves) from any givem starting position in puzzle-8 game.


There puzzle-8 is a game with 3x3 board, 8 tiles and one blank spot.  Any tile adjacent to the blank spot can be moved into that spot, creating a new gap position. Such rearrangement of the board considered a sinlgle move.  The goal is to arrange tiles in some order, usually ascending order running around perimeter.


 


Interview_Puzzle_eight_board.png






Answers and Comments