Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cpp solution to lc problem: No.188 #623

Merged
merged 1 commit into from
Dec 5, 2021
Merged

Conversation

imp2002
Copy link
Contributor

@imp2002 imp2002 commented Dec 5, 2021

image

@yanglbme yanglbme merged commit 4fb8bde into doocs:main Dec 5, 2021
@yanglbme
Copy link
Member

yanglbme commented Dec 5, 2021

@imp2002 发现这里的递推式写错了:

**dp[i][0] = max{dp[i][0], dp[i - 1][1] + prices[i]}**

应该是:

**dp[i][0] = max{dp[i][0], dp[i - 1][1] - prices[i]}**

yanglbme added a commit that referenced this pull request Dec 5, 2021
* Update solutions to lc No.0188.Best Time to Buy and Sell Stock IV, fix
  #623
* Add solutions to lcof2 No.102.Target Sum
@yanglbme
Copy link
Member

yanglbme commented Dec 5, 2021

改过来了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants