reverse a given array was completed