answersLogoWhite

0

Bubble sort, also known as sinking sort, is a simple sorting algorithm that works by repeatedly stepping through the list to be sorted, comparing each pair of adjacent items and swapping them if they are in the wrong order. The pass through the list is repeated until no swaps are needed, which indicates that the list is sorted. The algorithm gets its name from the way smaller elements "bubble" to the top of the list. Because it only uses comparisons to operate on elements, it is a comparison sort. Although the algorithm is simple, it is not efficient for sorting large lists; other algorithms are better.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Different types of sorting techniques in c language?

types of sorting in c language are: insertion sort selection sort bubble sort merge sort two way merge sort heap sort quick sort


What is another name for bubble sort?

Bubble sort is also known as sinking sort.


What is sort in C programming pls ans. this... thanks?

There is a built-in qsort function, see stdlib.h


Is bubble sort a stable sorting algorithm?

Yes, bubble sort is a stable sorting algorithm.


Which sorting algorithm is more efficient for small datasets: bubble sort or selection sort?

Selection sort is more efficient for small datasets compared to bubble sort.


What Program that lists telephone numbers in numeric order or street address?

In programming this could be achieved using a numeric bubble sort. Excel allows this type of sorting to be used.


Is quick sort is an example of dynamic programming algorithm?

quick sort is a divide and conquer method , it is not dynamic programming


Who invented the bubble sort?

ramesh


What is c and c in computer programming?

C and C++ are both high-level programming languages.


When would you use bubble sort?

Never. Bubble sort is often cited as an example of how not to write a sorting algorithm and is used purely as a programming exercise. It is never used in production code. Although reasonably efficient when sorting small lists, an insertion sort performs better on average. But for larger lists it has no practical uses. A merge sort is better for large lists, but if stability isn't an issue a quick sort is even better. Hybrid sorts typically use quick sort until a partition is small enough for an insertion sort to complete the job.


Bubble sort Extra or in space?

Bubble sort is an "in place" algorithm. Other than a temporary "switch" variable, no extra space is required.


Sort a book list in a library based on the discipline USING C plus plus programming?

Write your own C++ functions for the following problems:o Sort a book list in a library based on the disciplineo Print the sorted output on the console