+ 1

How to understand​ bubble sort program in js

I want to know how bubble sort algorithms works

28th May 2017, 3:16 PM
vignesh waran
vignesh waran - avatar
6 Respuestas
+ 2
I highly doubt any industry would use bubble sort, but its a good start to learn sorting algorithms since it's probably the easiest to make. If you are going into the industry, you will likely need to know lots of (other) sorting techniques.
28th May 2017, 3:50 PM
Rrestoring faith
Rrestoring faith - avatar
+ 2
Easier ones: *Bubble sort (Likely will never use) *Selection sort (Could be used, not often) *Insertion sort (Has practical applications) Harder, but Very effecient: *Quick sort *Shell sort *Merge sort *Tim sort
28th May 2017, 4:05 PM
Rrestoring faith
Rrestoring faith - avatar
+ 2
thanks for sharing this. I will study this one. Is it enough to know algorithms?
28th May 2017, 4:12 PM
vignesh waran
vignesh waran - avatar
+ 1
It goes through the list/array, if one elements value is smaller than the previous, the values are swapped. Take a look at the animation on the wiki page: https://en.m.wikipedia.org/wiki/Bubble_sort Ps: It's overall one of the (if not the) slowest sorting algorithm. I do not recommend using it for real projects.
28th May 2017, 3:43 PM
Rrestoring faith
Rrestoring faith - avatar
+ 1
so I know algorithms will be used in industries or Is this only for our own practice?
28th May 2017, 3:47 PM
vignesh waran
vignesh waran - avatar
+ 1
could u tell me some important algorithms. for programmers must know?
28th May 2017, 3:56 PM
vignesh waran
vignesh waran - avatar