Skip to content

Instantly share code, notes, and snippets.

@vumaasha
vumaasha / randomizedquicksort.py
Created March 8, 2012 02:51 — forked from anonymous/randomizedquicksort.py
Randomized Quick Sort in python
from random import randint
def inPlaceQuickSort(A,start,end):
if start<end:
pivot=randint(start,end)
temp=A[end]
A[end]=A[pivot]
A[pivot]=temp
p=inPlacePartition(A,start,end)