GATE 2022 PH – Question 9
On the square grid, move from P2 to P5. Each step is two cells along one axis and one along its perpendicular axis. Shaded cells cannot be occupied at the end of a step. Find the minimum number of steps.

Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (C) 6
Explanation
A breadth-first search using the eight knight moves and excluding shaded destinations first reaches P5 after six steps.