Use this function to get first missing sequence in an array