5 ms·
It depends on the application of the hash table, but malicious agents could 'attack' code by purposefully creating collisions if the author isn't careful. An al
by rm999 14y ago
It depends on the application of the hash table, but malicious agents could 'attack' code by purposefully creating collisions if the author isn't careful. An algorithm expected to run in O(1) that runs at O(n) could be catastrophic.
- marshray 14y agoBut the solution to that problem (using a cryptographic hash function randomized with a secret) doesn't change the complexity of the algorithm.
- rm999 14y agoI'm just pointing out that the worst case time complexity is an issue that can't always be cast aside. Aren't cryptographic hash functions generally slower?