-
-
Save amankharwal/da2312f3b9351c10c50a75b0a9e4c044 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
def reduceSize(rec, size): | |
while totalSize(rec, size) > 700: | |
index = random.randint(0, size - 1) | |
if(rec & (1 << index) > 0): | |
rec = rec ^ (1 << index) | |
return rec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment