Introduction to Bubble Sort

Bubble sort sorts an array, by swapping elements that are in the wrong order.

The algorithm starts with the first element in the array until the last element in the array, and keeps on doing so until there is one complete pass without swapping! This creates a “bubble” effect, hence the name.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy