更新代码块

This commit is contained in:
youngyangyang04
2021-08-10 22:20:48 +08:00
parent c7c34dd824
commit 8a2d42013c
192 changed files with 552 additions and 552 deletions

View File

@@ -20,7 +20,7 @@
所以本题遍历顺序最终遍历顺序:**target背包放在外循环将nums物品放在内循环内循环从前到后遍历**。
```C++
```CPP
class Solution {
public:
int combinationSum4(vector<int>& nums, int target) {
@@ -56,7 +56,7 @@ public:
和昨天的题目[动态规划377. 组合总和 Ⅳ](https://mp.weixin.qq.com/s/Iixw0nahJWQgbqVNk8k6gA)基本就是一道题了,遍历顺序也是一样一样的!
代码如下:
```C++
```CPP
class Solution {
public:
int climbStairs(int n) {
@@ -93,7 +93,7 @@ public:
外层for循环遍历物品内层for遍历背包
```C++
```CPP
// 版本一
class Solution {
public:
@@ -115,7 +115,7 @@ public:
外层for遍历背包内层for循环遍历物品
```C++
```CPP
// 版本二
class Solution {
public:
@@ -148,7 +148,7 @@ public:
先遍历背包,在遍历物品:
```C++
```CPP
// 版本一
class Solution {
public:
@@ -167,7 +167,7 @@ public:
先遍历物品,在遍历背包:
```C++
```CPP
// 版本二
class Solution {
public: