notes on the basic sorting algorithms