AMD Interview Question

How do you re-sort a sorted and shifted arraw?