小编Mic*_*ler的帖子

实现一个简单的Trie,用于高效的Levenshtein距离计算 - Java

更新3

完成.下面是最终通过我所有测试的代码.再次,这是模仿Murilo Vasconcelo的Steve Hanov算法的修改版本.感谢所有帮助!

/**
 * Computes the minimum Levenshtein Distance between the given word (represented as an array of Characters) and the
 * words stored in theTrie. This algorithm is modeled after Steve Hanov's blog article "Fast and Easy Levenshtein
 * distance using a Trie" and Murilo Vasconcelo's revised version in C++.
 * 
 * http://stevehanov.ca/blog/index.php?id=114
 * http://murilo.wordpress.com/2011/02/01/fast-and-easy-levenshtein-distance-using-a-trie-in-c/
 * 
 * @param ArrayList<Character> word - the characters of an input word as an array representation
 * @return int - the minimum …
Run Code Online (Sandbox Code Playgroud)

java algorithm performance trie levenshtein-distance

37
推荐指数
2
解决办法
2万
查看次数