Paths through a grid
mediumRecursion20 XP
Start in the top-left cell of a grid with rows rows and cols columns. Moving only right or down, how many different paths reach the bottom-right cell?
Examples
- Input: rows = 3, cols = 3Output: 6
- Input: rows = 1, cols = 5Output: 1
Examples use JSON: true/false/null are True/False/None in Python.