5 kyu
Array.diff hero
733Iprit
Description:
You know about simple Array.diff task. Now try to solve enhanced version!
Your goal in this kata is to implement a difference function, which subtracts one list from another.
It should remove all values from list a
, which are present in list b
.
Each element x
in both arrays is integer and 0 ≤ x ≤ 25
. And lengths of arrays can reach 5 000 000
elements.
arrayDiffVeryFast([1,2],[1]) == [2]
If a value is present in b
, all of its occurrences must be removed from another:
arrayDiffVeryFast([1,2,2,2,3],[2]) == [1,3]
Arrays
Fundamentals
Similar Kata:
Stats:
Created | Nov 7, 2016 |
Published | Nov 7, 2016 |
Warriors Trained | 2008 |
Total Skips | 107 |
Total Code Submissions | 4423 |
Total Times Completed | 733 |
JavaScript Completions | 733 |
Total Stars | 51 |
% of votes with a positive feedback rating | 84% of 137 |
Total "Very Satisfied" Votes | 105 |
Total "Somewhat Satisfied" Votes | 19 |
Total "Not Satisfied" Votes | 13 |
Total Rank Assessments | 9 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |