How I can return IntArray with reduce or fold?

前端 未结 0 1137
长发绾君心
长发绾君心 2021-02-09 06:53

I have the following data for my task:

Input: nums = [1,2,3,4]
Output: [1,3,6,10]
Explanation: Running sum is obtained as follows: [1, 1+2, 1+2+3, 1+2+3+4].


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题