I really ought to sleep…

I just wanted t see if I still knew how to write a quicksort by hand. Checked it against “Intruction to Algorithms, 2ND ed.” afterwards and it actually checks out. 🙂

package net.leenarts.algorithms.quicksort;

import java.util.Arrays;

public class QuickSort {

public static void main(String[] args) {
int[] A = {3,8,5,9,2,7,4,6,2,9,1,4,2,7,5,4};
System.out.println(Arrays.toString(A));
doQuickSort(A, 0, A.length -1);
}
public static void doQuickSort(int[] A, int p, int r) {
if (pCategoriesRandom thoughts