Algorithm Pseudocode:
BubbleSort(A[0..n-1])
 for i=0 to n-2 do
  for j=0 to n-2-i do
   if A[j+1] < A[j]
    swap A[j] with A[j+1]

Bubble sort is regarded as one of the most inefficient sorting algorithms of the O(n squared) sorting algorithms (Astrachan). This comes from bubble sorts inability to perform sorts on arrays of medium or large size. Many still posit that Bubble sort is relatively easy to code for what it can do and in comparison, to other sorting algorithms of O(n2). This is again rebuked by Sedgewick by saying that overall bubble sort is still more difficult to implement from an algorithm to a program than insertion or selection sorts (Astrachan). What Is good about bubble sort however is its ease of understanding what is going on as it sorts, and its ability to be used as an example of inefficiency and how it is improved upon by insertion and selection sorts.