Skip to content

Commit

Permalink
Merge pull request ankitpriyarup#3 from gauravengine/master
Browse files Browse the repository at this point in the history
Update dynamic-programming.md; Slight typo in friends pairing problem
  • Loading branch information
ankitpriyarup committed Feb 24, 2021
2 parents 0375bc2 + d61b755 commit 1c3c060
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 1c3c060

Please sign in to comment.