STL Example - Sort, rotate and reverse an array