Last active
December 18, 2015 11:42
-
-
Save kvasdopil/1549ec228d73867ef270 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
in1 = [...] | |
in2 = [...] | |
out = [] | |
while len(in1) and len(in2): | |
if in1[0] > in2[0]: | |
out.append(in1.pop(0)) | |
else | |
out.append(in2.pop(0)) | |
if len(in1): | |
out.append(in1) | |
else | |
out.append(in2) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment