954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

application of bubble sorting

can somebody tell me what can be the application of bubble sorting.or what actually application of bubble sorting means is it the usage of bubble sort in different areas.please give me some applications of it..

ayeshashahid
Newbie Poster
12 posts since Oct 2011
Reputation Points: 10
Solved Threads: 1
 

The only application for bubble sort is in the classroom. It's a simple algorithm, arguably the simplest sorting algorithm, and well suited as an introduction to the concept. However, it's hideously inefficient even compared to other quadratic sorting algorithms.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

Since bubble sort is efficient, you may want to look into some optimizations of bubble sort; there may serve better purpose

Example : Bidirectional bubble sort http://en.wikipedia.org/wiki/Cocktail_sort

tungnk1993
Junior Poster in Training
95 posts since May 2010
Reputation Points: 6
Solved Threads: 7
 
Since bubble sort is efficient


I think you meant to type "inefficient". I also like to add the adverb "woefully" since it drives the point home. ;)

you may want to look into some optimizations of bubble sort; there may serve better purpose


Polish a turd and it's still a turd.Example : Bidirectional bubble sort http://en.wikipedia.org/wiki/Cocktail_sort
Funny you should bring that up, because it has a suitable quote from Knuth:But none of these refinements leads to an algorithm better than straight insertion [that is, insertion sort]; and we already know that straight insertion isn't suitable for large N. [...] In short, the bubble sort seems to have nothing to recommend it, except a catchy name and the fact that it leads to some interesting theoretical problems.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

Insertion sort is also inefficient generally but it still have its own uses :)

tungnk1993
Junior Poster in Training
95 posts since May 2010
Reputation Points: 6
Solved Threads: 7
 
Insertion sort is also inefficient generally but it still have its own uses :)


I don't think you understand the point that's being made. If you're going to use a quadratic sorting algorithm (bubble sort, insertion sort, selection sort, etc...), bubble sort is the worst choice by a significant margin.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

>>Polish a turd and it's still a turd.

But its a cleaner turd? Anyways, who wants to touch a turd anyways, grosss lol.


As per the application of bubble-sort, the only place I seen it was in my introductory course. But even then I don't know if that is really a good idea. The one time I would show bubble sort is to demonstrate how not to write algorithms, or use it as a leeway to implement a better one.

firstPerson
Senior Poster
3,923 posts since Dec 2008
Reputation Points: 841
Solved Threads: 608
 

thanks everyone,i really got what i was looking for :)

ayeshashahid
Newbie Poster
12 posts since Oct 2011
Reputation Points: 10
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You