 Bubble sort, and variants such as the shell sort and cocktail sort, are simple, highly-inefficient sorting algorithms.They are frequently seen in introductory texts due to ease of analysis, but they are rarely used in practice.