Back to problems

Unique Paths

Algorithm · Okta · Easy

You are given an m x n grid. You begin at the top-left corner (cell (0,0)) and your goal is to reach the bottom-right corner (cell (m-1, n-1)). At each step, you are allowed to move exactly one cell either down or right. Determine the total number of distinct paths you can take to go from the start to the destination. Input Two integers m and n, which denote the number of rows and the number of columns in the grid, respectively. Output A single integer representing the count…

Checking your access…