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

 

tmhscs@gmail.com streams > array_sumElements
prev  |  next  |  chance

Given an integer array "arr", return the sum of all of its elements.


array_sumElements([1, 2, 3]) → 6
array_sumElements([2, 5]) → 7
array_sumElements([3, 1, 4]) → 8

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

public int array_sumElements(int[] arr) { }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy