What sort algorithm provides the best worst-case performance?

后端 未结 16 2103
[愿得一人]
[愿得一人] 2020-12-15 14:44

What is the fastest known sort algorithm for absolute worst case? I don\'t care about best case and am assuming a gigantic data set if that even matters.

16条回答
  •  旧巷少年郎
    2020-12-15 15:10

    It all depends on the data you're trying to sort. Different algorithms have different speeds for different data. an O(n) algorithm may be slower than an O(n^2) algorithm, depending on what kind of data you're working with.

提交回复
热议问题