摘要:
132. 分割回文串Ⅱ 题目来源 132. 分割回文串 II 思路 方法一 动态规划 class Solution { public int minCut(String s) { int len = s.length(); char[] cs = s.toCharArray(); // 预处理是不是 阅读全文
摘要:
300. 最长递增子序列 题目来源 300. 最长递增子序列 思路 方法一 动态规划 创建一个一维的dp数组,用来记录当前位置为结尾时,最长的递增子序列的长度为多少。 class Solution { public int lengthOfLIS(int[] nums) { int len = nu 阅读全文