Maximum Reward (Intuit India)

Problem Overview

  • Determine the maximum reward achievable by passing one ball among players arranged in an N x M grid.
  • A throw can go only right or down; each catch earns value(i2,j2) - value(i1,j1); the sequence must include at least two players and may start/end anywhere.
  • Input: N, M (2–1000) and N rows of M integers in [-1000,1000]; Output: the maximum reward.
  • Real-world setting: cricket fielding practice with MS Dhoni.
  • An Intuit India coding interview question from Intuit interviews; a grid path optimization problem.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: