摘要:
两个字符串可以经过修改,增加, 删除一个字符作为一个操作,经过n步操作,两个字符串变为一样的,相似度就为n,求n。 1 #include <iostream> 2 #include <cstring> 3 4 using namespace std; 5 6 char strA[10] = "abddd"; 7 char strB[10] = "aebdd"; 8 9 int calcDistance(int sa, int ea, int sb, int eb)10 {11 if(sa > ea)12 {13 if(sb 阅读全文
posted @ 2012-08-11 20:36
Eric-Yang
阅读(227)
评论(0)
推荐(0)

浙公网安备 33010602011771号