07 2021 档案

摘要:JAVA: public final boolean canCross(int[] stones) { int len = stones.length; return jump(stones, 0, 0, new HashMap<Long, Boolean>()); } private final 阅读全文
posted @ 2021-07-24 21:28 牛有肉 阅读(92) 评论(0) 推荐(0) 编辑
摘要:JAVA DP 反向: public final int maximalSquare(char[][] matrix) { int xLen = matrix.length, yLen = matrix[0].length, re = 0; int[][] cache = new int[xLen] 阅读全文
posted @ 2021-07-22 23:24 牛有肉 阅读(74) 评论(0) 推荐(0) 编辑
摘要:JAVA DP: public final boolean wordBreak(String s, List<String> wordDict) { Set<String> set = new HashSet<String>(); for (String word : wordDict) set.a 阅读全文
posted @ 2021-07-13 23:55 牛有肉 阅读(67) 评论(0) 推荐(0) 编辑
摘要:JAVA DP: public final int shoppingOffers(List<Integer> price, List<List<Integer>> special, List<Integer> needs) { Map<String, Integer> cache = new Has 阅读全文
posted @ 2021-07-06 13:52 牛有肉 阅读(56) 评论(0) 推荐(0) 编辑