bool = [True] * (len(nums) + 1)
for i in nums:
bool[i] = False
for b in xrange(len(bool)):
This solution does not use constant extra space
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.