I want to perform a circular left shift in an array between index i and index j (both inclusive).
For example : Consider array A such as,
int[] A = {1, 2, 3, 4, 5};
If I want to perform circular left shift in the given array A between 0 (index i) and 2 (index j), the output is :
A = {2, 3, 1, 4, 5}
Is there any inbuilt function in java that can perform this type of operation.
I'm not asking about how to circular left shift an array n times. My question is to circular left shift some of the elements within an array as I have showed through the example.