Sorting is a method for reorganizing a number of items into a desired order. You can sort things alphabetically, from lowest-to-highest or by any other measure desired.
Bubble sort is a simple sort that swaps numbers after comparison. The main difference between bubble and insertion sort is that neighbor elements are compared in bubble sort as opposed to the consistent placing of an element at the beginning of the array.
The name bubble comes from the “bubbling” up of larger numbers as they are compared. You’ll notice this in the visualization below.
You can see a visualization here: https://visualgo.net/en/sorting
The general outline for bubble sort is: