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