Quick Sort based on an example from "The C Programming Language - Brian W. Kernaghan & Dennis M. Ritchie"