Skip to content

Commit

Permalink
Update dynamic-programming.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravengine committed Feb 24, 2021
1 parent 0375bc2 commit d61b755
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dynamic-programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Note that {1, 2} and {2, 1} are considered same.
Answer:
dp[i] = dp[i-1] + (n-1) * dp[n-2]
nth person can remain single so dp[n-1] + he can be coupled with other (n-1)
person making dp[n-2] * (n-2)
person making dp[n-2] * (n-1)
```

### Jump Game
Expand Down

0 comments on commit d61b755

Please sign in to comment.