V2EX  ›  英汉词典

Trie

释义 Definition

Trie(前缀树/字典树):一种树形数据结构,用于高效存储和检索字符串集合,尤其擅长按前缀进行查找(如自动补全、词典查询)。常见操作(插入、查找、前缀查询)的时间复杂度通常与字符串长度成正比。

发音 Pronunciation

/triː/

例句 Examples

I used a trie to store English words for fast lookup.
我用字典树来存英语单词,以便快速查询。

Because the search depends mainly on the length of the query string, a trie can outperform hashing for prefix queries like autocomplete.
由于查找主要取决于查询字符串的长度,字典树在自动补全这类前缀查询中可能比哈希更高效。

词源 Etymology

trie一词源自 retrieval(检索) 的缩写/造词(强调“用于检索”),在计算机领域中常被读作 /triː/,与 tree(树) 同音,便于记忆它的树形结构含义。该术语常与信息检索与字符串处理场景一起出现。

相关词 Related Words

文献与作品 Literary / Notable Works

  • Introduction to Algorithms(Cormen, Leiserson, Rivest, Stein,常称 CLRS)
  • The Art of Computer Programming, Volume 3: Sorting and Searching(Donald E. Knuth)
  • Algorithms(Robert Sedgewick, Kevin Wayne)
  • Competitive Programming(Steven Halim 等)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2099 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 05:05 · PVG 13:05 · LAX 21:05 · JFK 00:05
♥ Do have faith in what you're doing.