All Problems
Problem #40 MEDIUM

The Recursive Staircase

Meta Apple Dynamic Programming Pattern Recognition

Problem Statement

A child is climbing a staircase with n steps. On each move, the child can climb exactly 1 step or exactly 2 steps. How many distinct sequences of moves can the child use to reach the top of the staircase? Write a formula or recurrence, compute the answer for n = 1 through 6, and explain why this sequence appears everywhere in nature and computer science.

Answer & Quick Explanation

Logged-in Users Only

You must be logged in to view the answer and check your solution. Signing up is free and takes less than a minute.

Detailed Editorial Solution

Detailed Editorial Solution is Premium

Unlock detailed step-by-step mathematical proofs, logic explanations, and company-specific interview preparation pathways.