摘要: 问题: 给定一个字符串,求其中最长回文子序列(子序列不是连续字符串)的长度。 Example 1: Input: "bbbab" Output: 4 One possible longest palindromic subsequence is "bbbb". Example 2: Input: " 阅读全文
posted @ 2020-09-06 16:57 habibah_chang 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 问题: 给定两个字符串,求他们的最长公共子序列的长度。 Example 1: Input: text1 = "abcde", text2 = "ace" Output: 3 Explanation: The longest common subsequence is "ace" and its le 阅读全文
posted @ 2020-09-06 15:26 habibah_chang 阅读(235) 评论(0) 推荐(0) 编辑