6 kyu
Length of missing array
2,161 of 16,900user5036852
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 | 36406 |
Total Skips | 6413 |
Total Code Submissions | 324139 |
Total Times Completed | 16900 |
C# Completions | 637 |
JavaScript Completions | 9707 |
Java Completions | 1527 |
Python Completions | 2161 |
Ruby Completions | 394 |
PHP Completions | 819 |
C++ Completions | 1253 |
TypeScript Completions | 657 |
CoffeeScript Completions | 22 |
Total Stars | 451 |
% of votes with a positive feedback rating | 79% of 2063 |
Total "Very Satisfied" Votes | 1412 |
Total "Somewhat Satisfied" Votes | 444 |
Total "Not Satisfied" Votes | 207 |
Total Rank Assessments | 8 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |