4 ms·
I need to know bubblesort? Fibonacci is an algorithm? Really? To be clear I need to not know bubblesort. And Fibonacci is not an algorithm.
by CalChris 10y ago
I need to know bubblesort? Fibonacci is an algorithm? Really?
To be clear I need to not know bubblesort. And Fibonacci is not an algorithm.
- khedoros1 10y ago> Fibonacci is an algorithm? Really? Fibonacci was a man. The Fibonacci sequence is a mathematical sequence. The various ways to calculate the Fibonacci sequence absolutely are algorithms. Bubble sort's arguably useful as a first learning point and as a stepping-off point to learning more practical sort algorithms...but probably not something that you'll need after that.
- schwede 10y agoKnowing the bubblesort is useful because it is the naive solution and isn't that great, so it leads you to dig for better options.
- chii 10y agoMore often than not, the sort function of the tech stack you use is the"best" already. Unless you're doing stuff at the peta scale, knowing bubble sort or not isn't going to be instrumental in the success of the project.
- khedoros1 10y agoBubblesort's a great learning tool, though. Knowing the implementation of bubblesort is like knowing my base-10 multiplication tables. In a realistic case, I'll use sort(), just like I'll use a calculator for any multiplication over a couple digits. Still, coding the algorithm (and some others for comparison) in class and seeing the practical differences in performance is a wonderful illustration of why algorithms have to be chosen carefully. Will it help in this project (or any other)? Almost impossible. But it provides a nice jumping off point during education, and really, you're not likely to actually forget it, right?
- christianmann 10y agoAlso bubblesort is sometimes the best solution, for instance in very small lists or linked lists.
- yitchelle 10y agoThe only time I found bubble sort to be of any use was when I was in pub and tried to use it for starting a conversation with non-tech friends about various algorithm. It failed badly.