Created
November 7, 2017 11:13
-
-
Save p1c2u/7ee714b4a003a22390da4771a2e66268 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 rev(L, left, right): | |
if left > right: | |
return | |
L[left], L[right] = L[right], L[left] | |
rev(L, left+1, right-1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment