6 kyu
Arrays Similar
3,151 of 3,719jgable
Description:
Write a function that determines whether the passed in sequences are similar. Similar means they contain the same elements, and the same number of occurrences of elements.
var arr1 = [1, 2, 2, 3, 4],
arr2 = [2, 1, 2, 4, 3],
arr3 = [1, 2, 3, 4],
arr4 = [1, 2, 3, "4"]
arraysSimilar(arr1, arr2); // Should equal true
arraysSimilar(arr2, arr3); // Should equal false
arraysSimilar(arr3, arr4); // Should equal false
Arrays
Algorithms
Similar Kata:
Stats:
Created | Jul 17, 2013 |
Published | Jul 31, 2013 |
Warriors Trained | 5010 |
Total Skips | 337 |
Total Code Submissions | 16700 |
Total Times Completed | 3719 |
JavaScript Completions | 3151 |
CoffeeScript Completions | 152 |
Python Completions | 429 |
Total Stars | 43 |
% of votes with a positive feedback rating | 93% of 488 |
Total "Very Satisfied" Votes | 425 |
Total "Somewhat Satisfied" Votes | 54 |
Total "Not Satisfied" Votes | 9 |