更新 完全背包理论基础 0139.单词拆分 0279.完全平方数 0322.零钱兑换 0377.组合总和IV 0518.零钱兑换II 多重背包理论基础 背包总结篇 排版格式修复

This commit is contained in:
jinbudaily
2023-07-26 15:28:27 +08:00
parent fc19feb049
commit 7ac217942f
8 changed files with 80 additions and 66 deletions

View File

@@ -31,9 +31,9 @@
因此输出为 7。
# 算法公开课
## 算法公开课
**《代码随想录》算法视频公开课:[装满背包有几种方法?求排列数?| LeetCode377.组合总和IV](https://www.bilibili.com/video/BV1V14y1n7B6/),相信结合视频再看本篇题解,更有助于大家对本题的理解**。
**[《代码随想录》算法视频公开课](https://programmercarl.com/other/gongkaike.html)[装满背包有几种方法?求排列数?| LeetCode377.组合总和IV](https://www.bilibili.com/video/BV1V14y1n7B6/),相信结合视频再看本篇题解,更有助于大家对本题的理解**。
## 思路
@@ -154,8 +154,7 @@ C++测试用例有两个数相加超过int的数据所以需要在if里加上
## 其他语言版本
Java
### Java
```Java
class Solution {
@@ -174,7 +173,7 @@ class Solution {
}
```
Python
### Python
卡哥版
@@ -207,7 +206,8 @@ class Solution:
```
Go
### Go
```go
func combinationSum4(nums []int, target int) int {
//定义dp数组
@@ -226,7 +226,8 @@ func combinationSum4(nums []int, target int) int {
}
```
Javascript
### Javascript
```javascript
const combinationSum4 = (nums, target) => {
@@ -245,7 +246,7 @@ const combinationSum4 = (nums, target) => {
};
```
TypeScript
### TypeScript
```typescript
function combinationSum4(nums: number[], target: number): number {
@@ -264,7 +265,7 @@ function combinationSum4(nums: number[], target: number): number {
};
```
Rust
### Rust:
```Rust
impl Solution {
@@ -289,3 +290,4 @@ impl Solution {
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
</a>