Sliding Puzzle: How to Solve It Every Time

Any sliding puzzle solves the same way every time: lock the top row, then the left column, shrink the board, and repeat until only a small corner is left to rotate into place.

DifficultyEasy
Time to read7 min
Last updatedJun 2026
Key takeaway: Never try to solve a sliding puzzle all at once. Finish the top row, then the left column, treat the rest as a smaller puzzle, and repeat. When only a two by two corner remains, cycle the tiles around the gap until they land. The same method works on any size grid.

1. Why layer by layer works

A sliding puzzle is a grid of numbered tiles with one empty space, and the goal is to slide tiles into order. The reason it feels overwhelming is that fixing one tile usually disturbs another, so trying to place everything at once just chases problems around the board.

The fix is to solve in layers and never touch what is already finished. Once I lock the top row and left column, I mentally erase them and treat what remains as a smaller, fresh puzzle. Each layer I complete shrinks the problem until it becomes trivial. This is exactly the same reduction idea that makes a Rubik's cube approachable, and it turns an intimidating scramble into a short, repeatable routine.

2. Solving the top row

I start with the top-left tile and place it, then work rightward along the row. For every tile except the last two, the job is simple: bring the empty space next to the tile, then slide the tile toward its target one step at a time. If I overshoot, I just loop the tile back around using the empty space and try again.

The key discipline is to avoid disturbing tiles I have already placed. As long as I keep my maneuvering below and to the side of the finished portion, the locked tiles stay put while I work on the next one.

3. The last-two-tiles trick

The final two tiles of a row are the only tricky part, because they need to drop into the corner together. If I place the top-right tile first in the normal way, the second-to-last tile usually has nowhere to go.

Instead I set them up as a pair. I park the top-right tile one cell below its target, and the second-to-last tile in the actual top-right corner. Then a short rotate slides both into their correct spots at once. It looks like magic the first time, but it is just a fixed little sequence I now do without thinking.

Pro tip Always move the empty space, not the tile, in your head. Picture where the gap needs to be for your next slide, route it there, and the tile follows. Thinking in terms of the gap is the single mental shift that makes sliding puzzles click.

4. Solving the left column

With the top row finished, the left column comes next, and it is the same idea rotated ninety degrees. I place the column tiles from the top down, and the bottom two of the column get the same setup-and-rotate pair trick that the row corner used.

Because the top row is already locked, I have to be careful to keep all my maneuvering to the right of and below the finished column. Done correctly, the row never moves while I build the column.

5. Shrinking the board

Once the top row and left column are both solved, something satisfying happens: the remaining tiles form a grid that is one row shorter and one column narrower. I treat that smaller block as a brand new sliding puzzle and run the exact same process again, top row then left column.

I keep reducing this way, peeling off a row and a column each pass. On a four by four puzzle this leaves me with a two by two square in the bottom right after a couple of rounds, and that final square is where the puzzle actually ends. This same momentum of locking pieces and never looking back is what makes the 2048 corner strategy feel so similar: build toward one fixed area and protect it.

6. The final corner

The last three tiles plus the gap sit in a two by two square in the bottom-right. I simply rotate them around the empty space, clockwise or counter-clockwise, and within a few moves they snap into their finished order.

If those last tiles refuse to resolve no matter how I cycle them, it means the starting scramble was one of the unsolvable arrangements, where exactly two tiles are swapped. A properly shuffled puzzle is always solvable, so on a fair board this final rotation always works, and the whole grid clicks into place.

FAQ

Is every sliding puzzle solvable?

No. Exactly half of all possible tile arrangements are unsolvable, where two tiles appear swapped. A fairly shuffled puzzle is always solvable, so if the final corner will not resolve, the board was set up in an impossible state.

Does this method work on bigger grids?

Yes. The layer-by-layer approach scales to any size. You just peel off more rows and columns before reaching the final two by two corner, so a five by five takes longer but uses the identical steps.

What is the most important habit to learn?

Think in terms of moving the empty space rather than the tiles. Route the gap to where you need it and the right tile slides into place, which makes every maneuver far easier to plan.

TL;DR: Solve the top row, then the left column, using the setup-and-rotate pair trick for the awkward last two tiles of each. Treat what remains as a smaller puzzle and repeat until only a two by two corner is left, then cycle those tiles around the gap. Move the empty space in your head, and any fair puzzle solves itself.