id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > dec18_2017_SLHL_sumSoFar
prev  |  next  |  chance

Write a method that returns an array of the partial sums of the integers in the input parameter array. Let 'nums' be the input parameter array and call 'sums' the array that is getting returned. So sums[k] is found by nums[0]+nums[1]+...+nums[k].


dec18_2017_SLHL_sumSoFar([]) → []
dec18_2017_SLHL_sumSoFar([200, 303, 40, 87, 3, 5, 10]) → [200, 503, 543, 630, 633, 638, 648]
dec18_2017_SLHL_sumSoFar([6, 55, 2, 73]) → [6, 61, 63, 136]

...Save, Compile, Run (ctrl-enter)

public int[] dec18_2017_SLHL_sumSoFar(int[] nums) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 280

Copyright Nick Parlante 2017 - privacy