Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Find the number of ways to reach the K-th Stair #44

Open
Akash2023IT opened this issue Oct 5, 2024 · 4 comments
Open

Add Find the number of ways to reach the K-th Stair #44

Akash2023IT opened this issue Oct 5, 2024 · 4 comments
Assignees

Comments

@Akash2023IT
Copy link

Hey,
This is a hard Leetcode Problem which uses a concept of memoization in recursion . Here is the question :
https://leetcode.com/problems/find-number-of-ways-to-reach-the-k-th-stair/description

You are given a non-negative integer k. There exists a staircase with an infinite number of stairs, with the lowest stair numbered 0.

Alice has an integer jump, with an initial value of 0. She starts on stair 1 and wants to reach stair k using any number of operations. If she is on stair i, in one operation she can:

Go down to stair i - 1. This operation cannot be used consecutively or on stair 0.
Go up to stair i + 2jump. And then, jump becomes jump + 1.
Return the total number of ways Alice can reach stair k.

Note that it is possible that Alice reaches the stair k, and performs some operations to reach the stair k again.

Please assign this to me @harsh-dart

@Akash2023IT
Copy link
Author

@harsh-dart pls add the hactoberfest labels

@aryaman0406
Copy link

Hi @harsh-dart please assign me this task.

@Blacksujit
Copy link

/assign

@Blacksujit
Copy link

Link to the PR #109

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants