Hashtable
Definition / 释义
哈希表(也作“散列表”):一种常用的数据结构,通过哈希函数把“键(key)”映射到存储位置,从而实现对数据的快速查找、插入与删除(平均情况下接近 O(1))。在发生哈希冲突时,通常用链地址法或开放定址法等策略处理。
Pronunciation (IPA) / 发音(IPA)
/htebl/
Examples / 例句
I stored the user IDs in a hashtable for quick lookup.
我把用户ID存进哈希表里,方便快速查询。
To avoid performance issues, the hashtable resizes automatically when the load factor becomes too high.
为避免性能问题,当负载因子过高时,这个哈希表会自动扩容。
Etymology / 词源
hashtable 是由 hash + table 组成的复合词。hash 在计算机语境中指“把数据通过哈希函数打散并映射到某个位置”的过程(也与英语里“把东西剁碎/混合”的原意相关),table 则指“表格/表状结构”。合起来就是“用哈希方法组织的一张表”。
Related Words / 相关词
In Literature / 文献与作品中的用例
- Introduction to Algorithms(Cormen, Leiserson, Rivest, Stein):在散列(hashing)与哈希表实现、分析中系统讨论。
- The Art of Computer Programming, Vol. 3: Sorting and Searching(Donald E. Knuth):包含对散列方法与相关技术的经典阐述。
- Programming Pearls(Jon Bentley):在算法与工程实践讨论中常涉及散列思想与“哈希表式”的查找策略。
- The C Programming Language(Kernighan & Ritchie):常见示例与习题中会用“hash table”来组织符号表/查找表。