Is it possible to calculate median of a list of numbers better than O(n log n)?

前端 未结 7 837
轻奢々
轻奢々 2021-02-14 04:24

I know that it is possible to calculate the mean of a list of numbers in O(n). But what about the median? Is there any better algorithm than sort (O(n log n)) and lookup middl

7条回答
提交回复
热议问题