NVIDIA interview question

This was the main interview question. Design subroutine (pseduo code) that takes variable length of array whose element are in consecutive order but has one missing element. And minimum length of array should be 2. First and Last element can't be missing