Robot Path with Minimum Charging Stops and Battery Capacity

You are given a 2D grid in which a robot must travel from S to D.

Each cell is one of:

  • S: the unique starting cell.
  • D: the unique destination cell.
  • .: a traversable normal cell.
  • `C...

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: