To find the 100th number in O(n) will do. On 11月10日, 下午11时09分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I consider 3 ways: > n=1 million. > 1. use a 100 heap (n*log(100)?) > 2. use a 1 million heap.(time O(nlogn)) > 3. use quicksort, each time, discard the less part. ( O(logn)?) > > but I can't tell which one is the best? is there any stardard way to > do it ? > thanks!
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups-beta.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---