2022年3月24日
摘要: package leetcode; public class offer_66 { public int[] constructArr(int[] a) { if(a==null||a.length==0) {return a;} //两个动态规划数组,存储当前位置连续连续积 int[] dp1=n 阅读全文
posted @ 2022-03-24 10:48 一仟零一夜丶 阅读(22) 评论(0) 推荐(0)
摘要: package leetcode; public class offer_39 { public int majorityElement(int[] nums) { int target=nums[0]; int count=0; //相同count就减一,不同则加一,因为target总存在,所以最 阅读全文
posted @ 2022-03-24 09:56 一仟零一夜丶 阅读(21) 评论(0) 推荐(0)