Completed the code for doublebubblesort