We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b02b9b commit e2bd9e7Copy full SHA for e2bd9e7
thinkings/prefix.md
@@ -24,6 +24,8 @@
24
25
对 [1,2,3,4,5,6] 来说,其前缀和可以是 pre=[1,3,6,10,15,21]。我们可以使用公式 pre[𝑖]=pre[𝑖−1]+nums[𝑖]得到每一位前缀和的值,从而通过前缀和进行相应的计算和解题。其实前缀和的概念很简单,但困难的是如何在题目中使用前缀和以及如何使用前缀和的关系来进行解题。
26
27
+题目推荐: [1480. 一维数组的动态和](https://leetcode-cn.com/problems/running-sum-of-1d-array/)
28
+
29
### 母题 1
30
31
如果让你求一个数组的连续子数组总个数,你会如何求?其中连续指的是数组的索引连续。 比如 [1,3,4],其连续子数组有:`[1], [3], [4], [1,3], [3,4] , [1,3,4]`,你需要返回 6。
0 commit comments