2020年4月19日

1. 线性DP 120. 三角形最小路径和

摘要: 经典问题: 120. 三角形最小路径和 https://leetcode-cn.com/problems/triangle/ func minimumTotal(triangle [][]int) int { n := len(triangle) dp := make([][]int,n) for 阅读全文

posted @ 2020-04-19 23:18 wsw_seu 阅读(109) 评论(0) 推荐(0) 编辑

1. 线性DP 1143. 最长公共子序列

摘要: 最经典双串: 1143. 最长公共子序列 (LCS) https://leetcode-cn.com/problems/longest-common-subsequence/submissions/ func longestCommonSubsequence(text1 string, text2 阅读全文

posted @ 2020-04-19 15:53 wsw_seu 阅读(148) 评论(0) 推荐(0) 编辑

1. 线性DP 300. 最长上升子序列 (LIS)

摘要: 最经典单串: 300. 最长上升子序列 (LIS) https://leetcode-cn.com/problems/longest-increasing-subsequence/submissions/ //GO //经典DP 线性DP //dp[i] 那么 nums[i] 必然要大于 nums[ 阅读全文

posted @ 2020-04-19 15:04 wsw_seu 阅读(214) 评论(0) 推荐(0) 编辑

导航