摘要:
https://leetcode.cn/problems/trapping-rain-water/description/大厂经典题,接雨水暴力双指针->预处理优化->单调栈 暴力: class Solution { public int trap(int[] height) { // 暴力解法: 阅读全文
摘要:
https://leetcode.cn/problems/all-paths-from-source-to-target/description/ class Solution { List<List<Integer>> res = new ArrayList<>(); int[][] g; // 阅读全文
摘要:
https://leetcode.cn/problems/longest-palindromic-subsequence/description/ class Solution { public int longestPalindromeSubseq(String s) { // f[i][j]表示 阅读全文
摘要:
https://leetcode.cn/problems/delete-operation-for-two-strings/solutions/ 两种做法,1.直接dp 2.转换题意,思考成LCS class Solution { public int minDistance(String word 阅读全文