FastPrepClimb Stairs with One or Two Steps
Problems/Climb Stairs with One or Two Steps

Climb Stairs with One or Two Steps

Intuit logoIntuit● EasyINTERNOA

Updated Oct 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The source asks for ways to climb using steps of one or two. The zero-step convention and exact 64-bit bound are practice assumptions; about 95% match.

Return the number of ordered sequences of moves that climb exactly n stairs. Each move climbs one or two stairs. Different move orders count separately. There is one way to climb zero stairs: make no moves. Return the exact count without a modulus.

Function

climbWays(n: int) → long

Examples

Example 1

n = 3return = 3

The sequences are 1,1,1; 1,2; and 2,1.

Example 2

n = 0return = 1

The empty sequence is the one zero-step way.

Constraints

  • For this exercise, assume 0 <= n <= 91, so the result fits a signed 64-bit integer.

More Intuit Online Assessment questions

  • Employee Promotion OpportunitiesOA · Seen Oct 2026
  • Next Pascal Row CoefficientOA · Seen Oct 2026
  • Parse Router LogsOA · Seen Oct 2026
  • Longest Repeated Letter Block with Adjacent SwapsOA · Seen Oct 2026
  • Maximum Square-Free DivisorOA · Seen Oct 2026
  • Two Tribes from Taller-Person CountsOA · Seen Oct 2026
  • Shortest Path from an Encoded GraphOA · Seen Sep 2026
  • Oldest and Youngest EmployeesOA · Seen Sep 2026
  • Pressure-Isolation Shutdown OrderOA · Seen Sep 2026
  • Submask Sum QueriesOA · Seen Sep 2026

Similar questions at other companies

  • Enough Muffins for the LineSusquehanna International Group (SIG) · OASusquehanna International Group (SIG) interview questions
  • Count Numbers with Digit SumCisco · OACisco interview questions
  • Find an Entry of Pascal’s TriangleMorgan Stanley · OAMorgan Stanley interview questions
  • Count Lucky TicketsThe D.E. Shaw Group · OAThe D.E. Shaw Group interview questions
  • Maximum Signal Walk in a Server TreeTower Research Capital · OA
  • Maximum Score with Prime JumpsMicrosoft · OAMicrosoft interview questions
  • Jump Game with Prime-3 StepsUber · OAUber interview questions
  • Profitable Currency Exchange CycleOptiver · OAOptiver interview questions
  • Count Valid A-B-C Sequences Under a Modulo-Four RuleInfosys · OAInfosys interview questions
  • Unique Paths Through a GridPeopleStrong · OAPeopleStrong interview questions

Intuit interview experiences

  • Intuit Software Engineering Intern - Full Stack OA Format
All Intuit interview questionsSee Intuit hiring insights
Saved
class Solution {
    public long climbWays(int n) {
        // Write your code here
    }
}
Checking account…