Dungeon Health

Given an m × n dungeon grid, each cell contains an integer:

  • A negative value decreases the knight's health.
  • 0 has no effect.
  • A positive value increases the knight's health.

A knight starts...

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: