alcdotcom, on 6 Mar, 2007 - 04:22 AM, said:
I think this problem is down for the count at O(n log n).
Hi
I have to agree that the given algorithm is at best O(log n), O(n log n) worst.
O(n) is really for a piece of very straight forward code, with perhaps a single loop to process some data.
regards
Greg

New Topic/Question
Reply



MultiQuote





|