Skip to content

Daily: 2026-10-25 — Climbing Stairs - #12

Merged
GAjay merged 1 commit into
mainfrom
daily/2026-10-25-climb-stairs
Oct 25, 2026
Merged

GAjay merged 1 commit into
mainfrom
daily/2026-10-25-climb-stairs

Conversation

@cursor

@cursor cursor Bot commented Oct 25, 2026

Copy link
Copy Markdown

Problem

  • Slug: climb-stairs
  • Folder: problems/2026-10-25-climb-stairs/

Approach

Distinct ways to reach step n equal ways(n-1) + ways(n-2) (each step can add 1 or 2). Base cases: n <= 2 return n. Iterative two-variable loop from 3 to n — Fibonacci without extra array.

Tests

  • node --test problems/2026-10-25-climb-stairs/climb-stairs.test.js — all passed (3/3)
  • npm run test:ci — all passed (38/38)
Open in Web View Automation 

@GAjay
GAjay marked this pull request as ready for review October 25, 2026 10:15
@GAjay
GAjay merged commit 94d1933 into main Oct 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant