摘要: 1 public class Solution { 2 public int[][] multiply(int[][] A, int[][] B) { 3 int aM = A.length, aN = A[0].length, bN = B[0].length; 4 int [][] result = new int[aM][bN]; 5 ... 阅读全文
posted @ 2016-07-27 05:54 keepshuatishuati 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1 public class Solution { 2 public int getMoneyAmount(int n) { 3 int[][] dp = new int[n + 2][n + 2]; 4 for (int len = 1; len < n; len++) { 5 for (int left = 1; le... 阅读全文
posted @ 2016-07-27 04:54 keepshuatishuati 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1 public class Solution { 2 public int combinationSum4(int[] nums, int target) { 3 Arrays.sort(nums); 4 int[] result = new int[target + 1]; 5 for (int i = 1; i i) { ... 阅读全文
posted @ 2016-07-27 04:33 keepshuatishuati 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 1 /* The guess API is defined in the parent class GuessGame. 2 @param num, your guess 3 @return -1 if my number is lower, 1 if my number is higher, otherwise return 0 4 int guess(int ... 阅读全文
posted @ 2016-07-27 02:07 keepshuatishuati 阅读(156) 评论(0) 推荐(0) 编辑