12 May 2017

Make Array Consecutive 2

My solution:
int makeArrayConsecutive2(int[] statues) 
{
    return statues.Max() - statues.Min() + 1 - statues.Length;
}

Previous