Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[pull] master from youngyangyang04:master #519

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

Merged
pull merged 10 commits into AlgorithmAndLeetCode:master from youngyangyang04:master
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
笔误修正
  • Loading branch information
youngyangyang04 committed Jan 3, 2025
commit aa6d892eaa9143312d8529d0b95ac7d418985c55
2 changes: 1 addition & 1 deletion problems/周总结/20210107动规周末总结.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public:

这道绝佳的面试题我没有用过,如果录友们有面试别人的需求,就把这个套路拿去吧。

我在[通过一道面试题目,讲一讲递归算法的时间复杂度!](https://programmercarl.com/前序/通过一道面试题目,讲一讲递归算法的时间复杂度!.html)中,以我自己面试别人的真实经历,通过求x的n次方 这么简单的题目,就可以考察候选人对算法性能以及递归的理解深度,录友们可以看看,绝对有收获!
我在[通过一道面试题目,讲一讲递归算法的时间复杂度!](../前序/递归算法的时间复杂度.md)中,以我自己面试别人的真实经历,通过求x的n次方 这么简单的题目,就可以考察候选人对算法性能以及递归的理解深度,录友们可以看看,绝对有收获!

## 周四

Expand Down
2 changes: 1 addition & 1 deletion problems/背包问题理论基础完全背包.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

* **放物品i**:背包空出物品i的容量后,背包容量为j - weight[i],dp[i][j - weight[i]] 为背包容量为j - weight[i]且不放物品i的最大价值,那么dp[i][j - weight[i]] + value[i] (物品i的价值),就是背包放物品i得到的最大价值

递归公式: `dp[i][j] = max(dp[i - 1][j], dp[i][j - weight[i]] + value[i]);`
递推公式: `dp[i][j] = max(dp[i - 1][j], dp[i][j - weight[i]] + value[i]);`

(注意,完全背包二维dp数组 和 01背包二维dp数组 递推公式的区别,01背包中是 `dp[i - 1][j - weight[i]] + value[i])`)

Expand Down

AltStyle によって変換されたページ (->オリジナル) /