def __findFirstMissing(self, array, start, end):
        """
        Find the smallest elements missing in a sorted array.

        Returns:
            int: The smallest element missing.
        """
        if (start > end):
            return end + 1

        if (start != array[start]):
            return start

        mid = int((start + end) / 2)

        if (array[mid] == mid):
            return self.__findFirstMissing(array, mid + 1, end)

        return self.__findFirstMissing(array, start, mid)
def __findFirstMissing ( self , array , start , end ) : if ( start > end ) : return end + 1 if ( start != array [ start ] ) : return start mid = int ( ( start + end ) / 2 ) if ( array [ mid ] == mid ) : return self . __findFirstMissing ( array , mid + 1 , end ) return self . __findFirstMissing ( array , start , mid )
Find the smallest elements missing in a sorted array.

        Returns:
            int: The smallest element missing.