This program illustrates the use of the STL partial_sort() algorithm (extended version) to partially order a vector of integers of size 12 by moving the first 5 values in the given ordering to the beginning of the vector, in the proper order. The range of values following this value may also be ordered, but the algorithm does not guarantee this, and you should not expect it. In this case the order of the elements is determined by one integer preceding another if and only if it has a smaller digit sum. Press Enter to continue ... Here are the initial contents of the vector: 92 21 53 84 46 13 41 76 45 61 11 15 Press Enter to continue ... Now we make the following call: partial_sort(v.begin(), v.begin()+5, v.end(), hasSmallerDigitSum); Press Enter to continue ... And here are the (partially sorted) contents of the vector, up to and including its 7th element: 11 21 13 41 15 84 92 76 46 45 53 61 Press Enter to continue ...