3 ms·
> Why not just hash the hand itself? "3459To" where o stands for off suit? Permutable hashes - you could just sort them and hash again, but the prime multiply
by gopalv 9y ago
> Why not just hash the hand itself? "3459To" where o stands for off suit?
Permutable hashes - you could just sort them and hash again, but the prime multiply hashing is pretty neat way of mapping all items in any order to the same hash code.
- _asummers 9y agoExactly. Leverages the fundamental theorem of arithmetic, that the product of primes is unique modulo permutations.