關(guān)于:找到兩個字符串最長的連續(xù)公共子串里無論是表達(dá)還是算法本身都是存在一定問題的,查找公共子串的問題在很多資料上都有明確的定義,通過動態(tài)規(guī)劃來解決,算法復(fù)雜度為O(M*N),在此向大家深表歉意。正確的做法在wikipedia上有所描述,請大家參考:
http://en.wikipedia.org/wiki/Longest_common_substring_problem
與
http://hellobmw.com/archives/dynamic-programming-longest-common-substring.html
posted on 2009-11-25 17:09
胡滿超 閱讀(181)
評論(0) 編輯 收藏 引用