bubblesort

Swap adjacent elements

Bubblesort is a simple sorting algorithm that repeatedly steps through a list, comparing adjacent items and swapping them if they're in the wrong order.

The process continues until no swaps are needed.

The name comes from how smaller values "bubble" to the top of the list.

Though easy to understand and implement, bubblesort is inefficient for large datasets—it's often taught as an introductory algorithm before students learn faster alternatives like quicksort or mergesort.

algorithm

comparison

Assessment of similarities

quadratic · pass · iteration · inefficient · naive · elementary · brute-force · stable · adaptive · optimization

mechanics

adjacent

Directly next to

  • swapExchange one for another
  • compareAssess relative likeness
  • passMove beyond or decline

traverse · iteration · index · flag · left-to-right · pairwise · successive · sweep · round · convergence

data

array

Ordered collection or display

  • listSequence of recorded items
  • elementsFundamental parts or substances
  • integersNumbers without fractional components

sequence · ascending · descending · order · arrangement · permutation · input · output · unsorted · collection

education

visualization

Forming mental or graphical images

tutorial · demonstration · animation · pseudocode · flowchart · example · textbook · classroom · illustration · stepping

Opposites
algorithmic efficiency

bubblesortquicksort

Recursive partitioning sort method

mergesort

Family

bubble, sort, bubbles, bubbled, bubbling, bubbly, sorts, sorted, sorting

Familiarity
Top 1,000,000
Profile
Used worldwide · Timeless · Abstract · Rated G