It is named bubble sort for the way that the smaller or larger elements bubble up to the top. Sometimes it is also known as sinking sort for the opposite reason. It is a comparison sort that repeatedly iterates through the list, compares the adjacent elements and swaps them if they are in the...
Apr 19, 2020