- 20220602开始,在完成了一遍剑指offer之后在进行细化练习。
| 英语 | 汉语 |
|---|---|
| acumulate | 总和 |
可以考虑剪枝或者预先排序输入
174、STL算法sort(matchsticks.begin(), matchsticks.end(), greater());变成递减排序 int sum = accumulate(matchsticks.begin(), matchsticks.end(), 0);求和

| 英语 | 汉语 |
|---|---|
| acumulate | 总和 |
可以考虑剪枝或者预先排序输入
174、STL算法sort(matchsticks.begin(), matchsticks.end(), greater());变成递减排序 int sum = accumulate(matchsticks.begin(), matchsticks.end(), 0);求和