Skip to content

Instantly share code, notes, and snippets.

@jan25
Created January 7, 2019 16:59
Show Gist options
  • Save jan25/93b0a0167804cec04c08419417d85b16 to your computer and use it in GitHub Desktop.
Save jan25/93b0a0167804cec04c08419417d85b16 to your computer and use it in GitHub Desktop.
class Solution:
def __init__(self, N, blacklist):
self.N = N - 1
self.blacklist = set(blacklist)
def pick(self):
while self.N in self.blacklist:
self.N -= 1
return self.N
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment