Bubble Sort
Learn Bubble Sort (Algorithms, Programming Fundamentals) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Bubble Sort - O(n²) Repeatedly compares adjacent elements and swaps them if out of order, "bubbling" the largest unsorted element to the end each pass. Simple to understand, but inefficient for large inputs.