quick sorting algorithm i wrote (with a lot of help!) while at cornell