add qsort and find_k_min code of chapter 8