Update dynamic-programming.md

pull/112/head
Yangshun Tay 7 years ago committed by GitHub
parent 7528c2bcf8
commit 7bee4bcaae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,10 +24,4 @@ Dynamic Programming
// [4, 10, 3, 1, 5] => 15
~~~
- Given a list of denominations (e.g., `[1, 2, 5]` means you have coins worth $1, $2, and $5) and a target number `k`, find all possible combinations, if any, of coins in the given denominations that add up to `k`. You can use coins of the same denomination more than once.
- You are climbing a stair case. It takes n steps to reach to the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
Example -
Input : 3;
Return : 3;
Steps : [1 1 1], [1 2], [2 1]
- You are climbing a flight of stairs. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? E.g. Input: 3, Output: 3. Explanation: `[1, 1, 1], [1, 2], [2, 1]`.

Loading…
Cancel
Save