摘要:
5. 最长回文子串 1.状态定义 //dp[i][j]表示s[i…j]是否为回文串 2.状态转移方程 dp[i][j] = (s[i] == s[j]) && dp[i + 1][j - 1] 3.边界值处理 dp[i][i] = true class Solution { public Strin 阅读全文
posted @ 2021-10-30 18:10
星予
阅读(35)
评论(0)
推荐(0)
摘要:
4. 寻找两个正序数组的中位数 1 class Solution { 2 public double findMedianSortedArrays(int[] nums1, int[] nums2) { 3 int n = nums1.length; 4 int m = nums2.length; 阅读全文
posted @ 2021-10-30 14:47
星予
阅读(43)
评论(0)
推荐(0)
浙公网安备 33010602011771号