Skip to content

Instantly share code, notes, and snippets.

@bcowell
Last active February 20, 2019 15:07
Show Gist options
  • Save bcowell/05f0e6f62815f507715a8d94610f397f to your computer and use it in GitHub Desktop.
Save bcowell/05f0e6f62815f507715a8d94610f397f to your computer and use it in GitHub Desktop.
sort-array-by-parity
def sortArrayByParity(self, A):
A.sort(key=lambda x: x%2)
return A
@bcowell
Copy link
Author

bcowell commented Feb 20, 2019

Faster than 99.88% solutions for leetcode 905. Sort Array By Parity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment