Maze Solving
You find yourself stuck in a maze! You have to find the shortest way out.
INPUT is a 19-by-19 grid: a cell containing 1 is a wall, an empty cell is open. You start at the top-left corner and must reach the bottom-right corner, moving up, down, left, or right through open cells; you cannot leave the grid.
Give your answer as a list of coordinates of the form <row>|<column>, one per row of OUTPUT, from the start (1|1) to the exit (19|19). Rows count from the top, columns from the left. The corners are always open, and there is exactly one shortest path.
Work on it
- Make a copy of the template — it becomes your private sheet.
- Solve it however you like — helper columns and extra tabs are fair game. The one rule:
the grader swaps
INPUTfor other datasets, so never put your own content insideINPUT. - Check yourself against the expected sample output shown in your copy (and below).
- Submit below — Share → "anyone with the link, Viewer", paste the link. Your sheet is graded against 2 hidden datasets, so hardcoded answers won't survive.
Sample
Input (Input!B2:T20)
| 1 | 1 | |||||||||||||||||
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |||||
| 1 | 1 | 1 | 1 | |||||||||||||||
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |||||
| 1 | 1 | 1 | 1 | 1 | 1 | |||||||||||||
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |||||||
| 1 | 1 | 1 | 1 | 1 | 1 | |||||||||||||
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |||||||
| 1 | 1 | 1 | 1 | 1 | 1 | |||||||||||||
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |||||||||
| 1 | 1 | 1 | 1 | 1 | 1 | |||||||||||||
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |||
| 1 | 1 | |||||||||||||||||
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||
| 1 | 1 | 1 | 1 | 1 | ||||||||||||||
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |||||||||
| 1 | 1 | 1 | 1 |
Expected output (Answer!B3:B62)
| Path |
|---|
| 1|1 |
| 2|1 |
| 3|1 |
| 3|2 |
| 3|3 |
| 4|3 |
| 5|3 |
| 6|3 |
| 7|3 |
| 7|4 |
| 7|5 |
| 8|5 |
| 9|5 |
| 10|5 |
| 11|5 |
| 12|5 |
| 13|5 |
| 13|6 |
| 13|7 |
| 13|8 |
| 13|9 |
| 13|10 |
| 13|11 |
| 13|12 |
| 13|13 |
| 13|14 |
| 13|15 |
| 14|15 |
| 15|15 |
| 16|15 |
| 17|15 |
| 17|14 |
| 17|13 |
| 18|13 |
| 19|13 |
| 19|14 |
| 19|15 |
| 19|16 |
| 19|17 |
| 18|17 |
| 17|17 |
| 17|18 |
| 17|19 |
| 18|19 |
| 19|19 |
Adapted from "Maze Solving" in the astral.cafe Community Practice Problems sheet.