(最长重复子数组)(两个数组)(动态规划)(dp[i][j] =dp[i-1][j-1])questioncode
文章目录questioncodequestioncodeclass Solution { public int findLength(int[] A, int[] B) { if (A.length == 0 || B.length == 0) { return 0; } int[][] dp = new int[A.length+1][B.length+1]; int result = 0;