Unique Paths Problem Statement
Given the dimensions of an M x N matrix, determine the total number of unique paths from the top-left corner to the bottom-right corner of the matrix.
Allowed moves are only to the right or down at each step.
Input:
The first line contains an integer 'T', the number of test cases.
For each test case, a single line contains two space-separated integers 'M' and 'N', representing the number of rows and columns of the matrix, respectively.
Output:
For each test case, output a single integer representing the total number of unique paths from the top-left to the bottom-right cell of the matrix.
Print the output for each test case on a new line.
Example:
Input:
T = 2
M = 2, N = 2
M = 3, N = 3
Output:
2
6
Constraints:
1 ≤ T ≤ 100
1 ≤ M ≤ 15
1 ≤ N ≤ 15
- The time limit is 1 second
Note:
There is no need for you to print anything; simply implement the function to compute the results.

AnswerBot
4mo
The problem involves finding the total number of unique paths from the top-left corner to the bottom-right corner of an M x N matrix with allowed moves only to the right or down.
Use dynamic programmin...read more
Help your peers!
Add answer anonymously...
Jio Platforms Software Developer interview questions & answers
A Software Developer was asked 7mo agoQ. Explain the rolling hash algorithm and its applications in data structures and a...read more
A Software Developer was asked Q. Write a program to print the Fibonacci series.
A Software Developer was asked 12mo agoQ. Synchronization in Java
Popular interview questions of Software Developer
A Software Developer was asked 7mo agoQ1. Explain the rolling hash algorithm and its applications in data structures and a...read more
A Software Developer was asked Q2. Write a program to print the Fibonacci series.
A Software Developer was asked 12mo agoQ3. Synchronization in Java
>
Jio Platforms Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

