FastPrepClimbing Stairs
Problems/Climbing Stairs

Climbing Stairs

Google logoGoogle● EasyNEW GRADPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report points to the well-known climbing-stairs problem without restating its rules. We use the usual version with one-step or two-step moves. Our version is about 90% the same as the reported question.

You are climbing a staircase with n steps.

On each move, you may climb either 1 step or 2 steps. Return the number of distinct sequences of moves that reach exactly the top.

Function

climbStairs(n: int) → int

Examples

Example 1

n = 2return = 2

The two valid sequences are 1 + 1 and 2.

Example 2

n = 5return = 8

Every valid sequence ends with either a 1-step move from step 4 or a 2-step move from step 3, giving 5 + 3 = 8 sequences.

Constraints

  • 1 <= n <= 45.

More Google Phone Screen questions

  • Route Pattern MatcherPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Periodic-Color Binary Forest RootsPHONE SCREEN · Seen Nov 2026
  • Evaluate a Nested Math ExpressionPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Best Stock Trade with Buy and Sell DaysPHONE SCREEN · Seen Nov 2026
  • Word Chain Jumps in a GridPHONE SCREEN · Seen Nov 2026
  • Dice-Walk Winning ProbabilityPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Lowest Common Ancestor in an N-ary TreePHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Apartment Housemate PreferencesPHONE SCREEN · Seen Nov 2026
  • Price at Query TimestampsPHONE SCREEN · Seen Nov 2026
  • Course Schedule Cycle DetectionPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026

Similar questions at other companies

  • Biased Coin: Probability of Exactly h HeadsAkuna Capital · PHONE SCREENAkuna Capital interview questions
  • Dice Sum That Is a Multiple of mSusquehanna International Group (SIG) · PHONE SCREENSusquehanna International Group (SIG) interview questions
  • Probability of Consecutive HeadsSquarepoint Capital · PHONE SCREENSquarepoint Capital interview questions
  • Count Staircase WaysGoldman Sachs · PHONE SCREENGoldman Sachs interview questions
  • Count Routes Through a City GridIMC Trading · PHONE SCREENIMC Trading interview questions
  • Ways to Climb n StairsAdobe · PHONE SCREENAdobe interview questions
  • Heads in Fair Coin FlipsJane Street · PHONE SCREENJane Street interview questions
  • Climbing StairsBloomberg LP · PHONE SCREENBloomberg LP interview questions
  • Climbing StairsExpedia · PHONE SCREEN · ONSITE INTERVIEWExpedia interview questions
  • Cumulative Fibonacci SumZillow · OA · PHONE SCREENZillow interview questions

Interview reports that mention this question

  • Google New Grad Phone Screen, Stairs and Sums: 1 Experience

Google interview experiences

  • Google interviews · November 2026
  • Google Software Engineer Onsite Questions: 10 Experiences
  • Google OA: What It Tests (2026)
  • Google L4 SWE Phone Screen: 1 Experience
  • Google ML Engineering Manager Onsite: 1 Experience
All Google interview questionsSee Google hiring insights
Saved
class Solution {
    public int climbStairs(int n) {
        // Write your code here.
    }
}
Checking account…