![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字典树
文章平均质量分 75
geguojun
天道酬勤
展开
-
统计难题(字典树)
DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分原创 2014-08-08 10:02:15 · 636 阅读 · 1 评论 -
Phone List(字典树,数据结构)
DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone catalogue listed these numbers:1. Emergency 911原创 2014-08-08 18:55:23 · 729 阅读 · 0 评论 -
IMMEDIATE DECODABILITY(字典树)
DescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all code原创 2014-08-09 15:50:26 · 495 阅读 · 0 评论 -
Word Puzzles(字典树)
DescriptionWord puzzles are usually simple and very entertaining for all ages. They are so entertaining that Pizza-Hut company started using table covers with word puzzles printed on them, possi原创 2014-08-11 17:26:34 · 985 阅读 · 0 评论 -
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 s原创 2014-08-11 17:02:02 · 420 阅读 · 0 评论