MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / rotate

Method rotate

RearrangeArrayInAlternatingPositions.java:19–27  ·  view source on GitHub ↗
(int nums[],int start, int end)

Source from the content-addressed store, hash-verified

17 }
18 }
19 public static void rotate(int nums[],int start, int end)
20 {
21 int temp=nums[end];
22 for(int i=end-1;i>=start;i--)
23 {
24 nums[i+1]=nums[i];
25 }
26 nums[start]=temp;
27 }
28 public static int[] rearrange(int nums[], int n)
29 {
30 int i=0,j=0,k=0;

Callers 1

rearrangeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected