摘要:
package leetcode; public class offer_63 { public int maxProfit(int[] prices) { if(prices.length<0||prices==null) { return 0; } int[] dp=new int[prices 阅读全文
posted @ 2022-03-09 11:27
一仟零一夜丶
阅读(18)
评论(0)
推荐(0)
摘要:
package leetcode; public class offer_10_2 { public int numWays(int n) { //斐波那契数列 int[] arr=new int[n+1]; if(n==0) {return 1;} if(n==1) {return 1;} if( 阅读全文
posted @ 2022-03-09 10:11
一仟零一夜丶
阅读(24)
评论(0)
推荐(0)
摘要:
package leetcode; public class offer_10_1 { public int fib(int n) { int[] arr=new int[n+1]; if(n==0) {return 0;} if(n==1) {return 1;} if(n>=2) { arr[0 阅读全文
posted @ 2022-03-09 10:02
一仟零一夜丶
阅读(24)
评论(0)
推荐(0)
浙公网安备 33010602011771号