dsa · medium

Unique Paths

A robot sits at the top-left of an m × n grid and may only move **right** or **down**. Return how many paths reach the bottom-right cell.

Arguments

Example

m = 3, n = 728.

m = 3, n = 23 (right-down-down, down-right-down, down-down-right).

Constraints

1 <= m, n <= 100 Hidden tests include near-max size for this bound; a slower-than-intended solution TLEs.

Examples

Example 1

Input:
3
7

Expected:
28

Example 2

Input:
3
2

Expected:
3

Open in the Dojo editor