Using Hash table gives the best performance in terms of time
complexity. I n is the number of strings in each array, it is O(n).

But if space is at a premium, use B-trees and the complexity would be
O(nlogn).

Bye,
Siva

Ovidiu.Silaghi wrote:
> I have two arrays of strings (lets say 10000 elements) and I need to
> compare them to see if they have the same elements.
> The arrays have only UNIQUE values and the same dimension! Arrays are
> not sorted..
> (Language VB6/VBA with Excel)
> I want two know which is the fastest/better solution...
> 
> Thanks in advance,
> Ov


--~--~---------~--~----~------------~-------~--~----~
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