摘要:
这道题好像没用成功回溯法。。。。反而变难了 class Solution { public int[] twoSum(int[] nums, int target) { List<Integer> list; return sum(nums,target,0,list,0); } public in 阅读全文
摘要:
第一个: class Solution { public int minPathSum(int[][] m) { if(m==null||m.length==0||m[0]==null||m[0].length==0){ return 0; } int row=m.length; int col=m 阅读全文
摘要:
方法一(采用交换的方法): public class L46 { public void backtrack(int n, ArrayList<Integer> nums, List<List<Integer>> output,int first){ if(first==n){ output.add 阅读全文