3 ms·
As a programmer, I want my user to have the best experience possible using my software. Using a generic sort function may be the optimal solution for me, as a p
by Protostome 7y ago
As a programmer, I want my user to have the best experience possible using my software. Using a generic sort function may be the optimal solution for me, as a programmer for getting the job done quickly, but in some occasions, it delivers an experience which is far from optimal for my user.
Let's take the sort function as an example.
There are many problems for which the sort function far from the optimal solution. For example, sorting billion numbers, each in [1,10000]. (You could do it in O(n), instead of O(nlogn), for large data sets it is significant)
- jf22 7y agoOk sure, but you can simply google different algos, try them out, and use the one that works best?
- Protostome 7y agoThat what you would do if you knew such a solution exist, but cant recall the exact implementation. In most cases, people who have no background in CS theory wouldn't even know such a solution exists and will resort to the generic "one-size-fits-all" solution