This program illustrates the use of the STL nth_element() algorithm (default version) to partition a vector of integers of size 12 around its 7th element. The ranges on either side of this value may or may not be sorted, but the algorithm does not guarantee this, and you should not expect it. Press Enter to continue ... Here are the initial contents of the vector: 10 2 6 11 9 3 4 12 8 7 1 5 Press Enter to continue ... Now we make the following call: nth_element(v.begin(), v.begin()+6, v.end()); Press Enter to continue ... And here are the contents of the vector partitioned around its 7th element: 1 2 3 4 5 6 7 8 9 10 11 12 Press Enter to continue ...