Ambar and sliding puzzle
CodeChefOpen on judge ↗
Ambar got hold of a puzzle and is desperately trying to solve it. The puzzle consists of a grid of 3 x 3 cells, with exactly 1 cell empty. The other 8 cells contain a distinct number in range $1...8$. It is allowed to move a cell adjacent to the empty space, which would create an empty place where that cell was present before the move. The goal of the game is to have the cells read $1..8$ readin
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start