2020年9月15日
摘要: package my; import java.util.Arrays; public class MissNumberSolution { public int missingNumber(int[] nums) { Arrays.sort(nums); if (nums[nums.length- 阅读全文
posted @ 2020-09-15 02:23 凌晨三点半的飞机 阅读(177) 评论(0) 推荐(0) 编辑
摘要: package my; public class IsUglySolution { boolean isUgly(int num){ if(num == 0){ return false; } while(num !=1){ if(num % 2 == 0){ num /= 2 ; continue 阅读全文
posted @ 2020-09-15 01:35 凌晨三点半的飞机 阅读(143) 评论(0) 推荐(0) 编辑
摘要: class Solution { public void moveZeroes(int[] nums) { int result=0 ; for(int i =0 ;i < nums.length;i ++){ if(nums[i]!= 0){ nums[result++] = nums[i]; } 阅读全文
posted @ 2020-09-15 00:48 凌晨三点半的飞机 阅读(167) 评论(0) 推荐(0) 编辑