Re:Adventures in Advent of Code
by mtlmtlmtlmtl on Saturday December 03, 2022 @08:37PM
(#33849621)
A lot of the time if the key is an int however you can get away with an array assuming the range is reasonably small.
Worth noting that for AOC I got by just fine with the simplest possible bucket based implementation.
If it's just a My First Hash table with closed addressing, buckets etc. you needn't care too much. If you're hashing integers, just use the integer itself, that's a terrible "hash" but with this like 1980s data structure it's good enough.