A bubble sort algorithm iterates through a list of data, comparing two items that are side by side to determine which is out of order.
Step 1: For i = 0 to N-1 repeat Step 2 Step 2: For J = i + 1 to N – I repeat Step 3: if A[J] > A[i] Swap A[J] and A[i] [End of Inner for loop] [End if Outer for loop] Step 4: Exit