@@ -0,0 +1,479 @@
+def swap(a, i, j):%0A    a%5Bi%5D, a%5Bj%5D = a%5Bj%5D, a%5Bi%5D%0A%0Adef partition(a, p, q):%0A    pivot = a%5Bq%5D%0A    i = p-1%0A    for j in xrange(p, q):%0A        if (a%5Bj%5D %3C= pivot):%0A            i += 1%0A            swap(a, i, j)%0A    swap(a, i+1, q)%0A    return i+1%0A%0Adef quicksort(a, p, r):%0A    if (p %3C r):%0A        pivot = partition(a, p, r)%0A        quicksort(a, p, pivot-1)%0A        quicksort(a, pivot+1, r)%0A%0Adef qsort(a):%0A    quicksort(a, 0, len(a) - 1)%0A%0Aarr = %5B1, 4, 3, 2, 4, 3, 6, 4%5D%0A%0Aqsort(arr)%0Aprint arr%0A

add quicksort