sample input and output
1 2
5 4 3
6 7 8
1 4 2
5 3
6 7 8
Sample input:
1 4 2 -1 5 3 6 7 8 //a sequence of 9 numbers representing the
initial state.
1 2 -1 5 4 3 6 7 8 //a sequence of 9 numbers representing the final
state.
Sample output:
PATH FOUND // if no path exists print: “NO PATH FOUND” and end
output
Moves: RIGHT -> UP -> RIGHT
Path:
1 4 2
-1 5 3
6 7 8
--->
1 4 2
5 -1 3
6 7 8
--->
1 -1 2
5 4 3
6 7 8
--->
1 2 -1
5 4 3
6 7 8