3 ms·
Bubblesort'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
by khedoros1 10y ago
Bubblesort'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?