字典树
葉心
这个作者很懒,什么都没留下…
展开
-
字典树(Trie)初步理解
写在开头:字典树,再社会也是棵树! 字典树,又名前缀树,洋名Trie,是一种树型数据结构。其特点就是专门用于存储字母单词(其实数字也行啦),占有空间大,但效率比哈希树稳定,孰优孰劣,视场景而定。 先考虑这样几个字符串{ "i", "pen", "apple", "pineapple", "app", "apap", "pine", "pine&原创 2018-08-02 21:34:02 · 344 阅读 · 0 评论 -
Phone List (HDU - 1671)
题目描述 Given 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 2....原创 2018-08-03 10:39:00 · 275 阅读 · 0 评论 -
Hat’s Words (HDU - 1247)
题目描述 A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary. You are to find all the hat’s words in a dictionary. Input Standard input...原创 2018-08-03 11:59:18 · 470 阅读 · 0 评论