摘要: class Solution { public int minPathSum(int[][] grid) { //border scenario int i = grid.length; int j = grid[0].length; ... 阅读全文
posted @ 2019-08-02 18:14 CodingYM 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 1138. Alphabet Board Path On an alphabet board, we start at position (0, 0), corresponding to character board[0][0]. Here, board = ["abcde", "fghij", 阅读全文
posted @ 2019-08-02 15:57 CodingYM 阅读(318) 评论(0) 推荐(0) 编辑
摘要: class Solution { public int tribonacci(int n) { if(n ==0){ return 0; } if (n ==1){ return 1; } ... 阅读全文
posted @ 2019-08-02 13:46 CodingYM 阅读(88) 评论(0) 推荐(0) 编辑
摘要: class Solution { public int maxSubArray(int[] nums) { // border examinine if (nums.length ==0 || nums==null){ return 0; } if(num... 阅读全文
posted @ 2019-08-02 13:24 CodingYM 阅读(111) 评论(0) 推荐(0) 编辑
摘要: class Solution { public int climbStairs(int n) { if (n ==0) return 0; if (n ==1){ return 1; } if(n ==2){ ... 阅读全文
posted @ 2019-08-02 12:57 CodingYM 阅读(93) 评论(0) 推荐(0) 编辑
摘要: class Solution { public int rob(int[] nums) { if(nums.lengthb? a: b; } } 阅读全文
posted @ 2019-08-02 12:17 CodingYM 阅读(116) 评论(0) 推荐(0) 编辑
摘要: import java.util.*; class Solution { public boolean divisorGame(int N) { if (N ==0){ return false; } Map st = new HashMap(); ... 阅读全文
posted @ 2019-08-02 11:06 CodingYM 阅读(98) 评论(0) 推荐(0) 编辑