6 kyu
Arrays Similar
3,149 of 3,711jgable
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 | 4999 |
Total Skips | 336 |
Total Code Submissions | 16689 |
Total Times Completed | 3711 |
JavaScript Completions | 3149 |
CoffeeScript Completions | 152 |
Python Completions | 423 |
Total Stars | 43 |
% of votes with a positive feedback rating | 93% of 486 |
Total "Very Satisfied" Votes | 425 |
Total "Somewhat Satisfied" Votes | 52 |
Total "Not Satisfied" Votes | 9 |