add a problem to use swap to sort an array