uacs2024

导航

2025年10月21日 #

leetcode448. 找到所有数组中消失的数字

摘要: 448. 找到所有数组中消失的数字 我的解法:额外数组 class Solution { public List<Integer> findDisappearedNumbers(int[] nums) { int n = nums.length; boolean[] flag = new boole 阅读全文

posted @ 2025-10-21 19:14 ᶜʸᵃⁿ 阅读(4) 评论(0) 推荐(0)

leetcode338. 比特位计数

摘要: 338. 比特位计数 常用技巧 | 位运算 我的解法: class Solution { public int[] countBits(int n) { int[] res = new int[n+1]; int k = 1; //k控制当前起始的位置 for(int i = 1;i <= n;++ 阅读全文

posted @ 2025-10-21 16:56 ᶜʸᵃⁿ 阅读(1) 评论(0) 推荐(0)