Question:codility Lesson4 MissingInteger
My answer:
def solution(A):
B = set((i for i in A if i > 0))
if B:
return next((i for i in range(1,len(B) + 2) if not i in B),1)
return 1
Question:codility Lesson4 MissingInteger
My answer:
def solution(A):
B = set((i for i in A if i > 0))
if B:
return next((i for i in range(1,len(B) + 2) if not i in B),1)
return 1
699
258

被折叠的 条评论
为什么被折叠?