Modify Bubble sort and selection sort