Grid Paths with Limited Consecutive Moves

Grid Paths with Limited Consecutive Moves

A frog starts at (0, 0) and must reach (X, Y). At each step, it may move:

  • right by one unit: (x, y) -> (x + 1, y), or
  • up by one unit: `(x, y) -...

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: