Why is a hash table considered O(1) time complexity and not O(n)?

前端 未结 0 805
独厮守ぢ
独厮守ぢ 2021-01-17 02:43

The underlying hashing algorithm hashes each character of the key, I understand this to be O(n) where n is the length of the key.

How can a hash table be considered O

相关标签:
回答
  • 消灭零回复
提交回复
热议问题