If we have a temporary variable then the O(n) solution works.

On 5/19/06, Karthik Singaram L <[EMAIL PROTECTED] > wrote:
Wont this algo have complexity O(n lgn) whereas a simple linear search would have O(n) and it would suffice for the problem





--
Manu Jose,
mob :09844467453
E-mail : [EMAIL PROTECTED]
-------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
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.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to