Make Array Consecutive
Bob has statues of different sizes, each statue having a non-negative integer size. He wants to arrange them so that each statue will be bigger than the previous one exactly by 1. He may need some additional statues to be able to accomplish that. Help him figure out the minimum number of additional statues needed.
Based on a Javascript challenge by @PizzaPokerGuy.