3 ms·
More 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 i
by chii 10y ago
More 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?