Eight sorting algorithms c++ implementation