Draft
Array Compression #1
45funnbot
Description:
This is the first in a series of Kata's about compressing an array.
For this one, you are given an array, and your job is to take all repeating items, and compress them in the following format [item, count]
Ex.
[1, 2, 5, 5, 5, 3, 3, 7, 8, 8] => [1, 2, [5, 3], [3, 2], 7, [8, 2]]
You can assume the array will always contain a value and will only contain integers and strings.
Arrays
Algorithms
Similar Kata:
Stats:
Created | Apr 15, 2018 |
Warriors Trained | 164 |
Total Skips | 8 |
Total Code Submissions | 147 |
Total Times Completed | 45 |
JavaScript Completions | 45 |
Total Stars | 2 |
% of votes with a positive feedback rating | 79% of 31 |
Total "Very Satisfied" Votes | 21 |
Total "Somewhat Satisfied" Votes | 7 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 30 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 3 kyu |
Lowest Assessed Rank | 8 kyu |