Unique Paths — Java Coding Problem
Difficulty: medium | Category: dynamic-programming
Problem Description
There is a robot on an `m x n` grid. The robot starts at the top-left corner and tries to reach the bottom-right corner. The robot can only move **right** or **down** at any time. Given the two integers `m` (rows) and `n` (columns), return the **number of unique paths** the robot can take. **Constraints:** - `1 <= m, n <= 100` Input format: `m|n`
Examples
Example 1
Input: m = 3, n = 7
Output: 28
Example 2
Input: m = 3, n = 2
Output: 3
Explanation: Right→Down→Down, Down→Right→Down, Down→Down→Right.