Skip to content

Instantly share code, notes, and snippets.

@p1c2u
Created November 7, 2017 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p1c2u/7ee714b4a003a22390da4771a2e66268 to your computer and use it in GitHub Desktop.
Save p1c2u/7ee714b4a003a22390da4771a2e66268 to your computer and use it in GitHub Desktop.
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