Still getting 58/60 points


I am still getting 58/60 points. I don’t think it could be more efficient then how to get full points?
my code:

int* rotateArray(int* A, int n1, int B, int *len) {
int *ret = (int *)malloc(n1 * sizeof(int));
*len = n1;
int i;
B = B%n1;

for (i = 0; i < n1-B; i++) ret[i] = A[i + B];
for (i = n1-B; i < n1; i++) ret[i] = A[i + B- n1];

return ret;



I think you are getting less points bcz of time taken to solve the problem not because of optimisation of code.


I think so too akash-jha
prashant-gupta, check if your time is closer to 15 min