Skip to main content
ilovecalcs logoilovecalcs.

Solver · Live

Zip Solver, one path through every square.

Use this free Zip solver for the LinkedIn Zip puzzle: enter the grid size, the numbered cells and any walls, and get the single path that visits every square in order. Replay it step by step to see how the route fits together.

How it worksPath search

Interactive

Zip Solver

Grid size6×6

Rows

6

Columns

6

Tap a cell to…

Next number: 1. Tap an empty cell to place it, or a numbered cell to remove it.

Tap a cell to place 1 where the path starts, then add 2, 3 … in order.

Copy your puzzle's grid size, then place its numbers in order and add any walls — then hit Solve.

Field guide

How the Zip Solver works.

Zip is a one-line path puzzle from LinkedIn's daily games. The board is a small square grid with a handful of numbered squares and, on some days, walls between neighbouring squares. You draw a single unbroken line that starts on 1, runs through the numbers in ascending order and covers every square exactly once. It moves up, down, left or right, never diagonally, cannot cross a wall and cannot revisit a square. In the standard puzzle the line finishes on the highest number.

Entering your puzzle

Set the rows and columns to match your board. With Place numbers selected, tap the square holding 1, then the square holding 2, and keep going; each tap uses the next free number, and tapping a numbered square removes its number so you can fix a slip. Switch to Add walls, tap a square and then the square beside it, and a thick bar appears between them. The Example button loads a practice grid written for this tool, so you can watch a full solve before typing in your own.

What the solver is doing

Finding the line is a Hamiltonian-path problem, and a naive search tries an enormous number of routes. The solver walks the grid with a depth-first search and abandons a branch the moment it can prove the branch is hopeless. It rejects routes that leave a square with only one way in, split the unvisited squares into disconnected pockets, or make it impossible to reach the next number before the squares around it run out. It also applies a checkerboard test, described below. Because the work happens in a background thread, the page never freezes, and a node limit stops a hopeless input from running forever.

The checkerboard test

Colour the grid like a chessboard. Every move steps from one colour to the other, so a path covering all the squares has a fixed rhythm. On a grid with an odd number of squares, such as 5×5, the line must start and finish on the same colour. On an even grid, such as 6×6, it must finish on the opposite colour. If your 1 and your highest number break that rule, no path exists, and the solver says so instead of searching.

Worked example

Take a 3×3 grid with 1 in the top-left corner, 2 in the centre and 3 in the bottom-right corner. The line needs eight moves. One answer runs right, right, down, left, left, down, right, right: across the top row, back through the centre, then along the bottom row to finish on 3. Heading down first and mirroring the route works too, so this grid has two solutions and the solver tells you so. Put a wall between the top-left square and the one below it, and only the first route survives. Real puzzles are built to have exactly one answer, which is why a “more than one path” notice usually points to a misread number or wall.

Reading the result

The solved path is drawn over the grid and replays automatically; drag the slider to step through it one square at a time, and each square shows its place in the route. Below the grid you also get the moves as a string of arrows, starting from the square marked 1, and Copy solution puts those arrows and the step-number grid on your clipboard. If the search hits its limit, you will see a time-out message rather than a wrong answer.

Tips for solving Zip yourself

  • Start with the squeezed squares. A corner, or a square with walls on two sides, has only two exits, so both connections are forced.
  • Link consecutive numbers first. Draw the shortest link from 1 to 2, then 2 to 3, and see which squares are left over.
  • Never strand a square. If a square would be left with one open neighbour, the line must end there, which is only allowed on the last number.

Disclaimer: This tool is an independent fan creation and is not affiliated with, authorized, or endorsed by LinkedIn Corporation. “Zip” is a trademark of its respective owner. Provided for practice and entertainment only.