
Algorithm
JackLi0812
Nothing is impossible to a willing heart.
展开
-
LCS 获取两个字符串的最长公共连续子串
上一篇 LeetCode 我们用暴力法求解的最长回文子序列的问题, 但是很可惜我们的时间复杂度太高, 不被接受, 今天我们本着另一个思想再次求解此问题, 但是由于新的算法需要获取两个字符串换的公共子串, 因此, 我们首先介绍一个新的问题: 获取两个字符串的最长公共连续子串. 例如: 输入: “abcfg” 与 “kmlozazui” “aaaaa” 与 “aaaaaaaaa” “abcdef...原创 2019-12-01 10:55:35 · 439 阅读 · 0 评论 -
最长回文子串--Solution 01
最长回文子串 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example 1: Input: "babad" Output: "bab" Note: "aba" is also a valid answer....原创 2019-11-20 10:37:48 · 324 阅读 · 0 评论