Ans.: The user will input an integer array and the method should shift each element of input array to its Left by one position in circular fashion. The logic is to iterate loop from Length-1 to 0 and swap each element with last element.
- input: 1 2 3 4 5, output: 2 3 4 5 1
No comments:
Post a Comment