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.

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation