![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字典树
Ashen_ffm
这个作者很懒,什么都没留下…
展开
-
POJ 3764--The xor-longest Path---DFS + Trie(最大异或值)
POJ 3764 The xor-longest PathTime Limit: 2000MS Memory Limit: 65536KDescriptionIn an edge-weighted tree, the xor-length of a path p is defined as the xor sum of the weights of edges on p:We say a path the xor-longest path if it has the largest xor-l原创 2020-11-01 21:54:30 · 225 阅读 · 0 评论 -
Leetcode---面试题 17.13. 恢复空格---每日一题---动态规划+字典树
面试题 17.13. 恢复空格哦,不!你不小心把一个长篇文章中的空格、标点都删掉了,并且大写也弄成了小写。像句子"I reset the computer. It still didn’t boot!“已经变成了"iresetthecomputeritstilldidntboot”。在处理标点符号和大小写之前,你得先把它断成词语。当然了,你有一本厚厚的词典dictionary,不过,有些词没在词典里。假设文章用sentence表示,设计一个算法,把文章断开,要求未识别的字符最少,返回未识别的字符数。注意原创 2020-07-09 13:20:54 · 145 阅读 · 0 评论