engineering recuitment GATE CSE 2023-24 Test Series Programming and Data Structure Programming in C Function Recursion
Consider a board game in consist of m × n grid. A coin is located at the top-left corner of an m × n grid. The coin can only move either down or right at any point in time. The ultimate goal of the game places the coin at the bottom-right corner of the grid. The following code returns the number of unique paths.
int path(int m, int n)
{
if (m == 1 || n == 1)
return 1;
return path(m-1, n) + path(m, n-1);
}
Find the number of unique paths if grid order is 5 × 4.
Enter numerical value using the virtual keypad. Round off where necessary.