Skip to content

Added Kth stair problem Solution - #423

Merged
shivamm-verma merged 3 commits into
shivamm-verma:mainfrom
aaqeebpinjari:main
Oct 19, 2025
Merged

Added Kth stair problem Solution #423
shivamm-verma merged 3 commits into
shivamm-verma:mainfrom
aaqeebpinjari:main

Conversation

@aaqeebpinjari

Copy link
Copy Markdown
Contributor

@shivamm-verma , @Shivangi10-10 , Good afternoon and Thanks for accepting my Request, Here by is my PR, looking forward for getting reviewed and Getting My PR merge into ur Valuable Codebase

Issue number if any:-

Fixes #390

Contribution Checklist (make sure all are checked)

  • Code file added (.cpp, .java, .py, etc.)
  • Markdown file added with:
    • Problem statement in seperate markdown.md
    • Example input/output
    • Generic logic
    • Time & space complexity

Screenshot of Result as proof and Added Comments for Better Understanding

image

📝 Type of Addition (check any one)

  • DSA problem addition

📊 Last check (make sure all are checked

  • Have you checked that this problem isn't already in the codebase?🔍
  • Did you cross-check that your code/explanation is right?

🏢 Your Organization?

  • GsSOC'25

@github-actions

Copy link
Copy Markdown

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

Comment on lines +18 to +21
// Total height covered if only "up" moves were taken:
// sum of powers of 2 up to i = (2^(i+1) - 1)
// Alice starts from stair 1, so total stairs from 1 = (2^i)
// stairs_covered_back = total up movement - target stair (k)

@shivamm-verma shivamm-verma Oct 19, 2025

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are too many comments in this particular file @aaqeebpinjari
Please make it as less as possible to reduce the LOC.

Suggested change
// Total height covered if only "up" moves were taken:
// sum of powers of 2 up to i = (2^(i+1) - 1)
// Alice starts from stair 1, so total stairs from 1 = (2^i)
// stairs_covered_back = total up movement - target stair (k)

@aaqeebpinjari aaqeebpinjari Oct 19, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shivamm-verma thanks for feedback

Fine I'll make changes ,
I have raised total 3 PR
Make suggestions in that

I'll make change in all at same time and make PR

Thanks for looking into this

@shivamm-verma shivamm-verma added the Requested Changes Please make the changes/fix reviews. label Oct 19, 2025
updated file as per admin instrunction.

@aaqeebpinjari aaqeebpinjari left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shivamm-verma , i made the changes and make it short and more readable, all changes are as per ur instructions looking forward for getting reviwed

@shivamm-verma shivamm-verma removed the Requested Changes Please make the changes/fix reviews. label Oct 19, 2025
@shivamm-verma
shivamm-verma merged commit 3c29a9c into shivamm-verma:main Oct 19, 2025
@github-actions

Copy link
Copy Markdown

🎉 Congrats on getting your PR merged!🙌🏼

Thanks for the contribution — every small chunk of contribution helps improve the project.
Looking forward to your next contribution! 🥳✨

WellDone

@github-actions github-actions Bot added gssoc25 Official gsssoc25 label, that marks the contribution. Level-3 Level 3 contribution PR Merged!🥳 Congrats labels Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc25 Official gsssoc25 label, that marks the contribution. Level-3 Level 3 contribution PR Merged!🥳 Congrats

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[New Problem] find-number-of-ways-to-reach-the-k-th-stair

2 participants