Aron Silvester wrote:The code below is for a bubble sort list wise (selection sort). I've gone over it multiple times but I don't know why it doesn't sort the numbers from ascending order. Below is the code and its output. What do you think is causing this? This by the way is from a youtube video.
BUBBLE SORT CODE LIST WISE (SELECTION SORT):
OUTPUT:
run:
Array before sorting:
1 6 5 8 9 4 3 2
*************************************
Array after sorting with bubble sort
1 6 5 8 9 4 3 2
Never mind I figured it out. Thanks.