• + 1 comment

    Looks good! To make this even faster, you should loop through n/2 items and swap a[i] with a[n-1-i].