1 points | by speckx 4 hours ago ago
1 comments
if the goal is to only get the median, you should not use sort. sort is O(nlogn). there are algo that give you medium at O(n), check quickselect.
if the goal is to only get the median, you should not use sort. sort is O(nlogn). there are algo that give you medium at O(n), check quickselect.