However, it is probably the simplest to understand. **Bubble** **sort** comes handy in cases where the total number of elements to be **sorted** is so small (may be in the 100’s range). The *bubble* *sort* is generally considered to be the simplest *sorting* *algorithm*.

## Write a algorithm for bubble sort

For languages where this is not possible, *sort* an array of integers. The __bubble__ __sort__ makes multiple passes through a list.

It compares adjacent items and exchanges those that are out of order.

### Write a algorithm for bubble sort

#### Write a algorithm for bubble sort

It is ed **Bubble** **sort**, because with each iteration the smaller element in the list **bubbles** up towards the first place, just like a water **bubble** rises up to the water surface. Let’s analyse __bubble__ __sort__ __algorithm__ in detail by implementing it as a C program.

Though it is so simple to implement in a C program, **bubble** **sort** is also considered as an inefficient **sorting** **algorithm**. HOW TO WRITE MPEG FILES TO DVD *Sorting* takes place by stepping through all the data items one-by-one in pairs and comparing adjacent data items and swapping each pair that is out of order.

Write a algorithm for bubble sort:

Rating: 91 / 100

Overall: 90 Rates