随笔分类 - dfs
摘要:public List<List<Integer>> combinationSum(int[] candidates, int target) { List<List<Integer>> ans = new ArrayList<>(); List<Integer> combine = new Arr
阅读全文
摘要:``java public List<List> combinationSum(int[] candidates, int target) { List<List> ans = new ArrayList<>(); List combine = new ArrayList<>(); dfs(cand
阅读全文
摘要:`private int m,n; private int[] dx = {-1, 0, 1, 0}; private int[] dy = {0, -1, 0, 1}; public int minPathSum(int[][] grid) { m = grid.length; n = grid[
阅读全文