+ 1
How to understandâ bubble sort program in js
I want to know how bubble sort algorithms works
6 Answers
+ 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.
+ 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
+ 2
thanks for sharing this. I will study this one. Is it enough to know algorithms?
+ 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.
+ 1
so I know algorithms will be used in industries or Is this only for our own practice?
+ 1
could u tell me some important algorithms. for programmers must know?