字典树
文章平均质量分 81
LOI_Sherlock
日拱一卒,功不唐捐。
展开
-
【poj 2001】Shortest Prefixes
DescriptionA prefix of a string is a substring starting at the beginning of the given string. The prefixes of “carbon” are: “c”, “ca”, “car”, “carb”, “carbo”, and “carbon”. Note that the empty string i原创 2017-10-06 20:54:51 · 253 阅读 · 0 评论 -
【学习记录】trie树(字典树)
部分概念引自百度百科和各位神犇资料,侵删。百度百科:字典树,又称单词查找树,Trie树,是一种树形结构,是一种哈希树的变种。典型应用是用于统计,排序和保存大量的字符串(但不仅限于字符串),所以经常被搜索引擎系统用于文本词频统计。 它的优点是:利用字符串的公共前缀来减少查询时间,最大限度地减少无谓的字符串比较,查询效率比哈希表高。 就是这个: Trie的核心思想是空间换时间。利用字符串的公共前原创 2017-10-06 11:26:33 · 363 阅读 · 2 评论