Skip to content

Bug Report for climbing-stairs #6121

Description

@Codinator29

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions