← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Practice/Meta/Leetcode 62. Unique Paths
CodingMust
A robot is positioned at the top-left corner of an m × n grid. The robot needs to navigate to the bottom-right corner. At each step, the robot can only move either downward or rightward.
Your task is to determine how many unique paths exist for the robot to reach its destination.
Example 1:
` Input: m = 3, n = 2 Output: 3 Explanation: The robot starts at position (0,0) and must reach (2,1). The three unique paths are:
Example 2:
Input: m = 3, n = 7 Output: 28 Explanation: A 3×7 grid has 28 distinct monotonic paths from top-left to bottom-right.
Example 3:
Input: m = 1, n = 1 Output: 1 Explanation: When the grid is just a single cell, there is exactly 1 path (staying in place).