Marks :10
: 5 | : 0
There is m*n table with a rabbit in one of the cell - rabbit is initiall at position [startR, startC] . rabbit is Hungry, want to eat something and crying. He is trying to come out of the table, rabbit is allowed to move to one of the four adjacent cells of a table, rabbit can move at most max no of moves(maxMoves).
Given integers m, n, maxMoves, startR, startC, return number of paths to move the rabbit out of the cell. The result might be very Large, return it using modulo 10^9+7
Example 1
Input m= 2, n = 2, maxMoves = 2, startR = 0, startC = 0
Output: 6
Example 2
Input m= 1, n = 3, maxMoves = 3, startR = 0, startC = 1
Output: 12
Constraints:
1 <= m, n <= 50
0 <= maxMove <= 50
0 <= startRow < m
0 <= startColumn < n
The input will contain 5 values: m, n, maxMove, startRow, startColumn
The output should contain one integer which is the answer mod 10^9 + 7.
1 4 3 0 1
14
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.