Algorithm · Meta · Medium
A maze is described by a rectangular character grid named maze. Exactly one cell holds the character 'S', which marks the mouse's starting position, and exactly one cell holds 'C', which marks the cheese. Any cell containing '#' is a wall that the mouse is forbidden to enter, while a '.' is open ground it may walk on. On each move the mouse advances by a single cell to a horizontally or vertically adjacent cell — that is, it may go up, down, left, or right. It may never step…
Checking your access…