Create RotateArray

Idea :
	If we are rotating an array by d elements, it means every element will move to the left/right by d positions. We put every element in its final position one by one. We start from element 1. Replace 3 by 1 .Assume that you have 3 in your hand(say temp storage) now. Then we replace 5 by 3, we continue this till we have moved all the 'n' elements  and then we stop. Note, we need to use modular arithmetic here. ith element to be placed in (i+d)mod (n) position. 'n' is total number of elements in array. There is one more case to handle here. Consider below array with 8 numbers. We replace in below orders.

11	22	33	44	55	66	77	88

Element	Array Index	Array Index of element after rotation
11	0	2
33	2	5
55	4	6
77	6	0
22	1	3
44	3	5
66	5	7
88	7	1

We started from array index '0'and we reached array index '0' when we were shifting 77 to its new position. Here we stop temporarily as we have reached the same location where we started. Since we have not yet shifted all the elements we again start from the next index to '0' i.e. '1' and continue till we encounter index '1'. We continue this until total shifted elements are equal to 'n'.

Time Complexity- O(n)
Space Complexity- O(1)