0% found this document useful (0 votes)
37 views

Bubble Sort

This algorithm sorts an array using the bubble sort method. It iterates through the array comparing adjacent elements and swapping them if they are out of order, repeating this process until the entire array is sorted from lowest to highest value. Elements "bubble" up through the array into their correct positions with each iteration.

Uploaded by

nipu90
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Bubble Sort

This algorithm sorts an array using the bubble sort method. It iterates through the array comparing adjacent elements and swapping them if they are out of order, repeating this process until the entire array is sorted from lowest to highest value. Elements "bubble" up through the array into their correct positions with each iteration.

Uploaded by

nipu90
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

(BUBBLE SORT)

1. for I=L TO U
2. { for J=L TO [(U-1)-I]
3. { if AR[J]>AR[J+1] then
{
4.
temp=AR[J]
5.
AR[J]=AR[J+1]
6.
AR[J+1]=temp
}
}
}
7. END.

You might also like