摘要: Majority Element 思路一: map public int majorityElement(int[] nums) { if (nums.length == 1) return nums[0]; Map<Integer, Integer> map = new HashMap<>(); 阅读全文
posted @ 2022-10-22 22:20 iyiluo 阅读(23) 评论(0) 推荐(0)
摘要: Reverse Bits 思路一: 遍历 32 位 bit,记录 bit 结果 public int reverseBits(int n) { int result = 0; int x = 32; while (x-- > 0) { int bit = n & 1; result <<= 1; i 阅读全文
posted @ 2022-10-22 20:54 iyiluo 阅读(23) 评论(0) 推荐(0)
摘要: 下面操作是在虚拟机环境下,根目录最好不要扩容或者缩小,一旦出问题很容易导致系统启动分区故障 查看磁盘信息fdisk -l Disk /dev/sda: 48 GiB, 51539607552 bytes, 100663296 sectors ... Device Boot Start End Sec 阅读全文
posted @ 2022-10-22 19:56 iyiluo 阅读(1311) 评论(0) 推荐(0)