x****h 发帖数: 9 | 1 题目是Given a dictionary,design an algorithm to find the optimal way of "
unconcatenating" a sequence of words. "optimal" is defined to be the
parsing which minimizes the number of unrecognized sequences of characters.
比如:
“jesslookedjustliketimeherbrother”
->"JESS looked just like TIM her brother" 在这里JESS和TIM是没有被识别的
前面解释看懂了,但是看不懂implement的那段code,有没有做过的人指点一下啊?
wordStart,wordEnd指的是什么啊,初始值是0,0?
还有bestExact,和bestExtend具体指的什么部分呢?
非常感谢! | x****h 发帖数: 9 | |
|