Skip to content

vineet-mi/BubbleSort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Bubble-Sort

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.

Understand Using the image below ....

0_lq-ZpDYjvYGmS7PO

Algorithm goes this way :

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