Sorting Algorithms in C++