Run error in code

this code is running correctly in my ide bur giving run error in

public static int countWays(int n, int m) {
    if (m-1 >= n)
        return 1;
    if (m == n)
        return 2;    
    return countWays(n - 1, m) + countWays(n - m, m);
}

in challange

@mfarhanhyd5 please share code using ide.codingblocks.com

Use memoization for this problem since the test cases can be big

thanks @Ishitagambhir , i will do in that way.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.