Stl function rotates takes three parameters - the beginning , the position by which it should be rotated , the end address of the array The below function will be rotating the array left in linear time ( k % arraySize ) times
rotate ( arr , arr + ( k % n ) , arr + n ) ;