arrow_back Back to Challenges

#70 Climbing Stairs

Easy Acceptance 0%
description

Problem Description

You are climbing a staircase. It takes `n` steps to reach the top. Each time you can either climb `1` or `2` steps. In how many distinct ways can you climb to the top?

checklist Constraints

1 <= n <= 45

science Examples

Case #1

In: n = 2
Out: 2

Case #2

In: n = 3
Out: 3

Mastery Tags

Dynamic Programming Math

Hiring Companies

Amazon Apple Google
code

Integrated IDE

code_blocks
Coding
psychology
Aptitude