improved derivation of average complexity of quick sort