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
|
3465 Discussions
|
Please Login in order to post a comment
Thanks for the solutions, they make the array-sum concept much clearer! I’m also exploring how to adapt this logic for a real project — specifically on my WordPress site for an Insurance service page. Has anyone here tried reusing these algorithms in practical web applications?
in javascript :
public static int simpleArraySum(List ar) {
def simpleArraySum(ar): x=0 for i in ar: x=i+x return x
def simpleArraySum(ar): finalSum = 0 for i in range(len(ar)): finalSum += ar[i] return finalSum
python