Last active
July 26, 2017 12:11
-
-
Save tbarbugli/3003de86f90fca5841b012787759fb87 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import random | |
random.seed(1) | |
l = [] | |
for i in range(1, 10000): | |
r = random.randint(1, 1000) | |
append_sorted(l, r) | |
print(l) | |
def append_sorted(l, el): | |
l.append(el) | |
l.sort() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment