Skip to content

Instantly share code, notes, and snippets.

@catupper
Created December 7, 2013 07:43
Show Gist options
  • Select an option

  • Save catupper/7838360 to your computer and use it in GitHub Desktop.

Select an option

Save catupper/7838360 to your computer and use it in GitHub Desktop.
def qsort(list):
pibot = list[0]
left = listのうち値がpibotより小さいもの
center = listのうち値がpibotと同じもの
right = listのうち値がpibotより大きいもの
return qsort(left) + center + qsort(right)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment