News for hackers. Stuff that matters.
Re:Things I Learned from a Job Hunt for a Senior Engineering... by tylerhou on Tuesday April 24, 2018 @03:37PM (#16915857)
Works if you assign prime numbers to each letter and multiply instead. So a=2, b=3, etc.
Re:Things I Learned from a Job Hunt for a Senior Engineering... by tuukkah on Tuesday April 24, 2018 @03:53PM (#16915981)
To get decent anagram lengths and complexity, implement the numbers as a dict of repetitions of primes, and implement the multiplication by summing the repetitions. ;-)
Re:Things I Learned from a Job Hunt for a Senior Engineering... by reinhardt on Tuesday April 24, 2018 @06:32PM (#16917241)
In which case you can just compare the dicts without performing the multiplication (which happens to be the costliest part for arbitrary-precision integers).
Re:Things I Learned from a Job Hunt for a Senior Engineering... by tuukkah on Wednesday April 25, 2018 @01:38AM (#16918850)
Exactly.