NPUZZLE
N-puzzle is a puzzle that goes by many names and has many variants. In this problem we will use the 15-puzzle. It consists of a 4-by-4 grid of sliding squares where one square is missing. The squares are labeled with uppercase letters 'A' through 'O', with the desired layout as follows:
InputFour lines of input contain four characters each, representing the state of the puzzle.
OutputOutput the scatter of the puzzle on a single line.
Input
Output
ABCD
EFGH
IJKL
M.NOOutput
2Input
Output
.BCD
EAGH
IJFL
MNOK Output
6 Submit solution
Sign in to submit a solution.