Skip to main content
1 of 8
Noodle9
  • 20.4k
  • 3
  • 23
  • 47

C (gcc), 88 bytes

t;m;i;j;f(l,n)int*l;{for(m=n,i=1;i++<-~n/2;l[m-=2]=t)for(t=*l,j=0;j<m-2;)l[j++]=l[j+1];} 

Try it online!

Inputs a pointer to the array and its length and milks the array in place.

Noodle9
  • 20.4k
  • 3
  • 23
  • 47