摘要:
class Solution { public int minPathSum(int[][] grid) { //border scenario int i = grid.length; int j = grid[0].length; ... 阅读全文
摘要:
1138. Alphabet Board Path On an alphabet board, we start at position (0, 0), corresponding to character board[0][0]. Here, board = ["abcde", "fghij", 阅读全文
摘要:
class Solution { public int tribonacci(int n) { if(n ==0){ return 0; } if (n ==1){ return 1; } ... 阅读全文
摘要:
class Solution { public int maxSubArray(int[] nums) { // border examinine if (nums.length ==0 || nums==null){ return 0; } if(num... 阅读全文
摘要:
class Solution { public int climbStairs(int n) { if (n ==0) return 0; if (n ==1){ return 1; } if(n ==2){ ... 阅读全文
摘要:
class Solution { public int rob(int[] nums) { if(nums.lengthb? a: b; } } 阅读全文
摘要:
import java.util.*; class Solution { public boolean divisorGame(int N) { if (N ==0){ return false; } Map st = new HashMap(); ... 阅读全文