Worse is better. Is there an example?

前端 未结 24 912
予麋鹿
予麋鹿 2020-12-12 19:03

Is there a widely-used algorithm that has time complexity worse than that of another known algorithm but it is a better choice in all practical si

24条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-12 19:45

    There's an O(n) algorithm for selecting the k-th largest element from an unsorted set, but it is rarely used instead of sorting, which is of course O(n logn).

提交回复
热议问题