Draft
Area under the graph
8kzm
Description:
The graph consists of points connected by straight lines. Input is series of points. Calculate surface area under the graph (painted grey). Points will be already sorted by x. Input will never be an empty array. x and y are always natural numbers.
For example: Input:
[
//[x, y]
[1, 2], // A
[2, 3], // B
[4, 2], // C
[5, 1], // D
]
Output: 9
Similar Kata:
Stats:
Created | Mar 16, 2019 |
Warriors Trained | 14 |
Total Skips | 0 |
Total Code Submissions | 16 |
Total Times Completed | 8 |
JavaScript Completions | 8 |
Total Stars | 0 |
% of votes with a positive feedback rating | 64% of 7 |
Total "Very Satisfied" Votes | 4 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 7 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |