摘要: Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.) You have 阅读全文
posted @ 2017-10-23 22:18 stAr_1 阅读(521) 评论(0) 推荐(0)
摘要: public int minimumDeleteSum(String s1, String s2) { /* 标准的动态规划题目,难点在于想出将两个字符串删除到相同的过程 这里从两个字符串的开头字符考虑,一个一个得考虑到最后一个,我们用二维数组dp[i][j]代表字符串1前i个字符和字符串2前j个字符实现相同所需要 删除的ASCII ... 阅读全文
posted @ 2017-10-23 22:00 stAr_1 阅读(913) 评论(0) 推荐(0)