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

Stats:

CreatedAug 19, 2016
PublishedAug 19, 2016
Warriors Trained36406
Total Skips6413
Total Code Submissions324139
Total Times Completed16900
C# Completions637
JavaScript Completions9707
Java Completions1527
Python Completions2161
Ruby Completions394
PHP Completions819
C++ Completions1253
TypeScript Completions657
CoffeeScript Completions22
Total Stars451
% of votes with a positive feedback rating79% of 2063
Total "Very Satisfied" Votes1412
Total "Somewhat Satisfied" Votes444
Total "Not Satisfied" Votes207
Total Rank Assessments8
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • user5036852 Avatar
  • suic Avatar
  • candrabeqx Avatar
  • ldfritz Avatar
  • Chrono79 Avatar
  • Dentzil Avatar
  • Blind4Basics Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • KayleighWasTaken Avatar
  • saudiGuy Avatar
Ad