Created
January 7, 2019 16:59
-
-
Save jan25/93b0a0167804cec04c08419417d85b16 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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