LeetCode Brush Questions 1480. Dynamic Sum of One-Dimensional Array
I don't know where I am going, but I am already on my way!
Time is hurried, although I have never met, but I met Yusi, it is really a great fate, thank you for your visit!
Subject : Here is an array for you nums. Array formula "and dynamic" as follows: runningSum[i] = sum(nums[0]…nums[i]). Please return to numsthe dynamic and.
Algorithm description: It is not possible to sum up from the beginning every time, resultadd new elements to the last result used , and add it to resultit.