6 kyu
Length of missing array
639 of 16,975user5036852
Description:
You get an array of arrays.
If you sort the arrays by their length, you will see, that their length-values are consecutive.
But one array is missing!
You have to write a method, that return the length of the missing array.
Example:
[[1, 2], [4, 5, 1, 1], [1], [5, 6, 7, 8, 9]] --> 3
If the array of arrays is null/nil or empty, the method should return 0.
When an array in the array is null or empty, the method should return 0 too!
There will always be a missing element and its length will be always between the given arrays.
Have fun coding it and please don't forget to vote and rank this kata! :-)
I have created other katas. Have a look if you like coding and challenges.
Arrays
Algorithms
Similar Kata:
Stats:
Created | Aug 19, 2016 |
Published | Aug 19, 2016 |
Warriors Trained | 36517 |
Total Skips | 6421 |
Total Code Submissions | 325113 |
Total Times Completed | 16975 |
C# Completions | 639 |
JavaScript Completions | 9740 |
Java Completions | 1532 |
Python Completions | 2186 |
Ruby Completions | 395 |
PHP Completions | 822 |
C++ Completions | 1260 |
TypeScript Completions | 660 |
CoffeeScript Completions | 22 |
Total Stars | 453 |
% of votes with a positive feedback rating | 79% of 2068 |
Total "Very Satisfied" Votes | 1415 |
Total "Somewhat Satisfied" Votes | 445 |
Total "Not Satisfied" Votes | 208 |
Total Rank Assessments | 8 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |