Prison Break: A Simple Counting Problem

Imagine a prison having 36 cells arranged like the squares in a 6-by-6 grid. All adjacent cells have doors between them; doors that you can open. You, the prisoner in the top-left corner cell, are told that you can have your freedom if you can find your way to the diagonally opposite corner cell, after passing through each other cell exactly once.

An empty prison map


Can you figure such a way out of the prison?

If this seems to be taking you an embarrassingly long time, feel free to click here for the solution

 
6
Kudos
 
6
Kudos

Now read this

Javascript Weekly Challenge #1

Starting today, I plan on coming out with a new JavaScript challenge every week. These problems might look leisurely and pointless at the outset, but solving them should require intermediate-level language skills. Answers will be posted... Continue →