Skip to content

Commit

Permalink
leetcode: Add index to 1480
Browse files Browse the repository at this point in the history
  • Loading branch information
XuShaohua committed Jul 28, 2024
1 parent 330dadc commit cae5128
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
- [1301-1400](leetcode/by-id/1301-1400.md)
- [1401-1500](leetcode/by-id/1401-1500.md)
- [1422. 分割字符串的最大得分 Maximum Score After Splitting a String](leetcode/1422.maximum-score-after-splitting-a-string/index.md)
- [1480. 一维数组的动态和 Running Sum of 1d Array](leetcode/1480.running-sum-of-1d-array/index.md)
- [1498. 满足条件的子序列数目 Number of Subsequences That Satisfy the Given Sum Condition](leetcode/1498.number-of-subsequences-that-satisfy-the-given-sum-condition/index.md)
- [1501-1600](leetcode/by-id/1501-1600.md)
- [1518. 换水问题 Water Bottles](leetcode/1518.water-bottles/index.md)
Expand Down
2 changes: 1 addition & 1 deletion src/leetcode/1480.running-sum-of-1d-array/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "lc-0000-name"
name = "lc-1480-running-sum-of-1d-array"
version = "0.1.0"
edition = "2021"
publish = false
Expand Down
11 changes: 9 additions & 2 deletions src/leetcode/1480.running-sum-of-1d-array/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# 1480. 一维数组的动态和 Running Sum of 1d Array

#
[问题描述](https://leetcode.com/problems/running-sum-of-1d-array)

[问题描述](https://leetcode.com/problems/)
这个就是基本的前缀和问题.

```rust
{{#include src/main.rs:5:14}}
```

时间复杂度是 `O(n)`, 空间复杂度是 `O(n)`
3 changes: 2 additions & 1 deletion src/leetcode/tags/prefix-sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
1. [0303. 区域和检索 - 数组不可变 Range Sum Query - Immutable](../0303.range-sum-query-immutable/index.md)
2. [0724. 寻找数组的中心索引](../0724.find-pivot-index/index.md)
3. [1422. 分割字符串的最大得分 Maximum Score After Splitting a String](../1422.maximum-score-after-splitting-a-string/index.md)
4. [1991. 找到数组的中间位置 Find the Middle Index in Array](../1991.find-the-middle-index-in-array/index.md)
4. [1480. 一维数组的动态和 Running Sum of 1d Array](../1480.running-sum-of-1d-array/index.md)
5. [1991. 找到数组的中间位置 Find the Middle Index in Array](../1991.find-the-middle-index-in-array/index.md)

## 中等

Expand Down

0 comments on commit cae5128

Please sign in to comment.