$begingroup$ In fact, all hash features do deliver output of a fixed length, regardless of the size on the enter. This does indicate that there's a theoretical probability of collisions — two various inputs generating the same hash.If the keys are strings (or integers), a trie could be another choice. A trie is a tree, but indexed in another way