Kabarcık Sıralama Algoritması
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* The Bubble Sort Algoritması *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
yöntem bubblesort(a_1, ... , a_n | n >= 2 için reel sayılar olmak üzere)
for i := 1 to n-1
for j := 1 to n-i
if a_j > a_(j+1) then değiştir a_j, a_(j+1)
{a_1, ... , a_n artan sırada}