How about this?

Assign a prime number to each of the the characters. Multiply each of the numbers in each string and compare the product. If they are the same then it is a permutation.

Cheers,
Nat

On 4/10/06, Kevin <[EMAIL PROTECTED]> wrote:

But the problem is:
there are much more than 26 possible characters in a string, even ASCII
have 100+ characters I think, not to mention those unicode, those which
use 2 or even more bytes as a character. So the Count[] will be too
large to be practical useful.




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