Solve BubbleSort