We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int* circularArrayRotation(int a_count, int* a, int k, int queries_count, int* queries, int* result_count) {
void reverse(int a[],int,int);
int i,j,count,x=0;
static int s[100];
reverse(a,x,a_count-k-1);
reverse(a,a_count-k,a_count-1);
reverse(a,x,a_count-1);
for(i=0;i
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Circular Array Rotation
You are viewing a single comment's thread. Return to all comments →
int* circularArrayRotation(int a_count, int* a, int k, int queries_count, int* queries, int* result_count) { void reverse(int a[],int,int); int i,j,count,x=0; static int s[100]; reverse(a,x,a_count-k-1); reverse(a,a_count-k,a_count-1); reverse(a,x,a_count-1);
for(i=0;i