Given an array of ‘N’ elements .Return the sum of all array elements

Test cases

Test cases Expected Result
arraySum({5,5,5,5,5}) 25 OK
arraySum({1,3,4,7,8}) 23 OK
arraySum({100,200,300}) 600 OK

Java solution:

Javascript solution:

About the author

Bushan Sirgur

Well, I am Bushan Sirgur from Banglore, India. Currently, I am working as a Software Developer in a Service Base Company. I am interested in JAVA/J2EE, Angular 2, JavaScript, jQuery, MongoDB.

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *