< a quantity that can be divided into another a whole number of time />

October 15, 2019

From Programming Praxis: There are many algorithms for recognizing anagrams. Here is an unusual one:

Assign each character to a prime number, then map a string to the corresponding primes, and compute their product. Two strings are anagrams only if they share a product.