Skip to content

Instantly share code, notes, and snippets.

@pygeek
Created August 23, 2012 17:53
Show Gist options
  • Save pygeek/3439434 to your computer and use it in GitHub Desktop.
Save pygeek/3439434 to your computer and use it in GitHub Desktop.
Retrieve items in a list where half have a higher idx of current idx, and half have lower idx of current idx
floor((i + (i-n)) / 2); n = total and i=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment