爬楼梯(070) class Solution { int[] memo = new int[50]; public int climbStairs(int n) { if (memo[n] != 0) return memo[n]; if (n == 0 || n ==1 ){ return 1;...
买卖股票的最佳时期(121) class Solution { public int maxProfit(int[] prices) { int res = 0; int min = Integer.MAX_VALUE; for (int i = 0; i lt; prices.length; i...