Solutions for Consecutive
View the challenge

This challenge requires you to determine how many numbers are needed to completely fill an array from the numbers between the minimum and maximum numbers. The code below works because the test cases will all be valid in the sense that you won't get an array like: [1, 2, 2, 2, 5] because between 1 and 5 there exist only the numbers 2, 3, and 4.

You need to be a member to see the rest of this solution and code.