Hard mathematics interview practice: 2D Grid Game II.
Explore this problem with a Quantercise subscription.