Lasers and Robot

Given an R × C grid:

  • S is the robot's starting cell.
  • # is a wall that cannot be entered.
  • L is a laser.
  • . is an empty cell.

Each laser destroys its entire row and column. Except tha...

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: