class MissingInteger: def __init__(self, sequence): self.sequence = sequence self.perfect_sequence = range(min(self.sequence), max(self.sequence) +1 ) def solution(self): for number in self.perfect_sequence: if number not in self.sequence: return number
- class MissingInteger:
def __init__(self, arr):self.arr = arrself.temp = [i for i in range(min(self.arr), max(self.arr) + 1)]- def __init__(self, sequence):
- self.sequence = sequence
- self.perfect_sequence = range(min(self.sequence), max(self.sequence) +1 )
- def solution(self):
for x, y in zip(self.arr, self.temp):if x != y:return yreturn None- for number in self.perfect_sequence:
- if number not in self.sequence:
- return number