![]() |
Welcome to the daily solutions of our PROBLEM OF THE DAY (POTD). We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Combinatorics but will also help you build up problem-solving skills. ![]() POTD 22 October: Number of pathsGiven an MxN matrix, The task is to count all the possible paths from the top left to the bottom right of an MxN matrix with the constraint that from each cell you can either move to the right or down. Return answer modulo 109+ 7. Number of paths using Combinatorics
Follow the steps to solve the above problem:
Below is the implementation of above approach: C++
Java
Python3
Time Complexity: O(M), This is because the for loop iterates M times |
Reffered: https://www.geeksforgeeks.org
Competitive Programming |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 14 |