Maximum Safe Straight-Line Movement on a Laser Grid

Given a numRows × numColumns board with 1-based row and column indices, some cells contain lasers.

The laser locations are given by laserCoordinates, where laserCoordinates[i] = [r, c] mean...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: