You are ignoring the complexity of the comparison function (reqd. for sorting). It is not O(1) for string comparison. It will be a function of the input size too.
On 7/19/06, L7 <[EMAIL PROTECTED]> wrote: > > @ridvansg > > Like I mentioned, O(n) for creating a hash table *ignores* the hash > function itself, which, for strings is going to be at least O(m). > So now you have O(n*m) > O(n*m) + O(n) (with the compare) > > So, unless O(m*n) < O(n log n), two sorts and compare will do the trick > without any extra space (except required by the sort). Not to mention > this is vba for excel.. do they have means to create a hash > table/function? (I don't use, so I don't know) -- -Piramanayagam ===================================== All you have to decide is what to do with the time that is given to you! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---