5 kyu
Mean Square Error
6,091 of 22,318kylehill
Description:
Complete the function that
- accepts two integer arrays of equal length
- compares the value each member in one array to the corresponding member in the other
- squares the absolute value difference between those two values
- and returns the average of those squared absolute value difference between each member pair.
Examples
[1, 2, 3], [4, 5, 6] --> 9 because (9 + 9 + 9) / 3
[10, 20, 10, 2], [10, 25, 5, -2] --> 16.5 because (0 + 25 + 25 + 16) / 4
[-1, 0], [0, -1] --> 1 because (1 + 1) / 2
Arrays
Mathematics
Algorithms
Similar Kata:
Stats:
Created | Jul 23, 2013 |
Published | Jul 23, 2013 |
Warriors Trained | 29798 |
Total Skips | 2675 |
Total Code Submissions | 41109 |
Total Times Completed | 22318 |
JavaScript Completions | 6091 |
C# Completions | 2024 |
PHP Completions | 1289 |
Scala Completions | 378 |
Python Completions | 8735 |
Ruby Completions | 594 |
C Completions | 1771 |
CFML Completions | 24 |
Prolog Completions | 17 |
Java Completions | 1898 |
Total Stars | 223 |
% of votes with a positive feedback rating | 86% of 1782 |
Total "Very Satisfied" Votes | 1357 |
Total "Somewhat Satisfied" Votes | 347 |
Total "Not Satisfied" Votes | 78 |