Is it acceptable if I
find the median in O(logn) time and then,
find k numbers closest to the median in O(k) space and O(n) time?

_dufus


On Aug 30, 4:38 pm, Nagendra Kumar <[email protected]> wrote:
> Given a set S of n distinct numbers and a positive integer k <= n.
> Determine the k numbers in S that are closest to the median of S.
> Find an O(n) algorithm

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to