Bug Report for https://neetcode.io/problems/climbing-stairs
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
Your provided solution itself is failing while submitting the solution
public class Solution {
public int climbStairs(int n) {
return dfs(n, 0);
}
public int dfs(int n, int i) {
if (i >= n) return i == n ? 1 : 0;
return dfs(n, i + 1) + dfs(n, i + 2);
}
}
This is failing - either exceeding the time out or infinite loop
Bug Report for https://neetcode.io/problems/climbing-stairs
Please describe the bug below and include any steps to reproduce the bug or screenshots if possible.
Your provided solution itself is failing while submitting the solution
public class Solution {
public int climbStairs(int n) {
return dfs(n, 0);
}
}
This is failing - either exceeding the time out or infinite loop