7 kyu
Sum it continuously
1,631 of 2,770Cptnprice
Description:
Make a function "add" that will be able to sum elements of list continuously and return a new list of sums.
For example:
add [1,2,3,4,5] == [1, 3, 6, 10, 15], because it's calculated like
this : [1, 1 + 2, 1 + 2 + 3, 1 + 2 + 3 + 4, 1 + 2 + 3 + 4 + 5]
If you want to learn more see https://en.wikipedia.org/wiki/Prefix_sum
Fundamentals
Lists
Similar Kata:
Stats:
Created | Sep 9, 2017 |
Published | Sep 10, 2017 |
Warriors Trained | 3809 |
Total Skips | 25 |
Total Code Submissions | 5963 |
Total Times Completed | 2770 |
Python Completions | 1631 |
Haskell Completions | 172 |
CoffeeScript Completions | 16 |
Nim Completions | 26 |
JavaScript Completions | 739 |
C++ Completions | 264 |
C Completions | 49 |
Total Stars | 35 |
% of votes with a positive feedback rating | 92% of 412 |
Total "Very Satisfied" Votes | 351 |
Total "Somewhat Satisfied" Votes | 53 |
Total "Not Satisfied" Votes | 8 |
Total Rank Assessments | 13 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |