Skip to content

Commit e2bd9e7

Browse files
author
lucifer
committed
feat: 增加题目链接
1 parent 8b02b9b commit e2bd9e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: thinkings/prefix.md

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
[1,2,3,4,5,6] 来说,其前缀和可以是 pre=[1,3,6,10,15,21]。我们可以使用公式 pre[𝑖]=pre[𝑖−1]+nums[𝑖]得到每一位前缀和的值,从而通过前缀和进行相应的计算和解题。其实前缀和的概念很简单,但困难的是如何在题目中使用前缀和以及如何使用前缀和的关系来进行解题。
2626

27+
题目推荐: [1480. 一维数组的动态和](https://leetcode-cn.com/problems/running-sum-of-1d-array/)
28+
2729
### 母题 1
2830

2931
如果让你求一个数组的连续子数组总个数,你会如何求?其中连续指的是数组的索引连续。 比如 [1,3,4],其连续子数组有:`[1], [3], [4], [1,3], [3,4] , [1,3,4]`,你需要返回 6。

0 commit comments

Comments
 (0)