We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Warmup
- Simple Array Sum
- Discussions
Simple Array Sum
Simple Array Sum
Sort by
recency
|
3372 Discussions
|
Please Login in order to post a comment
Hello everyone ! Here is my JAVA solution :
int sum = 0; for(int i=0;i
I really don't have idea whats going on
well this was too easy once you're doing it with python.
just writing a return statement in the method
return sum(ar) `
Here is my python Solution.
def simpleArraySum(ar): # Write your code here addition = 0 for i in ar: addition += i return addition
Hi everyone! Here's my Java Solution for the challenge. If anyone wants to chat about programming, just reach out!
https://github.com/eduardocintra/hacker-rank-solutions/blob/master/src/br/com/eduardocintra/easy/simplearraysum/SimpleArraySum.java