Click here to Skip to main content
15,791,758 members
Articles / State

Using Top Down Dynamic Programming to Solve the Climbing Stairs Problem

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
9 Dec 2020CPOL7 min read 6.1K   3  
In this article, we will talk about the top down (memoization) strategy to solve a popular DP problem: Climbing Stairs.
You are climbing a staircase. It takes n steps to reach the top. Each time you can either take 1 or 2 steps. The goal is to find how many distinct steps we can make to get to the top of the stairs.


Daily Counts


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
United States United States
Joshua is a passionate software developer working in the Seattle area. He also has experience with developing web and mobile applications, having spent years working with them.

Joshua now finds his spare coding time spent deep in the trenches of VR, working with the newest hardware and technologies. He posts about what he learns on his personal site, where he talks mostly about Unity Development, though he also talks about other programming topic that he finds interesting.

When not working with technology, Joshua also enjoys learning about real estate investment, doing physical activities like running, tennis, and kendo, and having a blast with his buddies playing video games.

Comments and Discussions