目录
- 最长公共子序列
- 不相交的线
- 最大子序和
- 判断子序列
一、最长公共子序列(不要求元素之间连续)
https://leetcode.cn/problems/longest-common-subsequence/?envType=problem-list-v2&envId=8At1GmaZ
[code]class Solution { public int longestCommonSubsequence(String text1, String text2) { int[][] dp = new int[text1.length()+1][text2.length()+1]; for(int i=1; i |