4 ms·
Ask a simple question, get a simple answer: no. While there are some programmers who develop libraries, the majority will just consume well-understood sorting
by patio11 12y ago
Ask a simple question, get a simple answer: no. While there are some programmers who develop libraries, the majority will just consume well-understood sorting algorithms which are baked into their languages/standard libraries/etc of choice. If you find yourself coding mergesort and you are not in a job interview, a nightmare, or a nightmare of a job interview, you are probably doing something wrong.
That said, most of the reason we teach sorting algorithms is to teach algorithms in general, and particularly the consequential lesson that "There are often many methods to doing something that work; these methods are often different in extraordinarily consequential ways; the right method for certain problems -- even ones which look trivial on the outside! --may require literally years of R&D to develop."
- aninhumer 12y agoEven ones that look trivial on the inside might take years of R&D to develop.
- throwaway43 12y agoAny examples ?
- CoreDumpling 12y agohttp://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html http://googleresearch.blogspot.com/2006/06/extra-extra-read-...
- danieldk 12y agohttp://mumble.net/~campbell/2014/04/28/uniform-random-float http://mumble.net/~campbell/2014/04/28/uniform-random-float
- dhotson 12y agoBoyer-Moore (finding a string in another string) is a good example: http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_sear...
- drcode 12y agoI personally think distributed networks with smart contracts are going to be "a thing" soon, and in that kind of environment virtual cpu cycles are constrained to a level where an Intel 8080 processor looks like a speed demon. In that type of environment, you need to do a lot of thinking about basic algorithm science, including exploring the many types of sorting algos. (Here's some code I'm working on right now in that vein, which helps to perform efficient percentile calculations in a smart contract https://github.com/drcode/ethereum-order-statistic-tree https://github.com/drcode/ethereum-order-statistic-tree)