Bubble sort: Difference between revisions

From The Wiki Camp 2 Jr.
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 19: Line 19:
position: relative;
position: relative;
width: 0;
width: 0;
left: -75px;
left: -70px;
top: 20px;
top: 20px;
}
}
Line 36: Line 36:
position: relative;
position: relative;
width: 0;
width: 0;
left: -75px;
left: -70px;
top: 45px;
top: 45px;
}
}

Revision as of 16:57, 4 May 2024

Bubble sort is a sorting algorithm which sorts elements one by one by having them "bubble up" through the list. At each step, adjacent elements are compared, and if the left element is greater than the right element, they are swapped. Try it out for yourself!

Gameplay