Ch5: sort the array using bubbleSort