摘要:
问题: 求0~num 每个数的二进制中含有 1 的个数。 Example 1: Input: num = 2 Output: [0,1,1] Explanation: 0 --> 0 1 --> 1 2 --> 10 Example 2: Input: num = 5 Output: [0,1,1, 阅读全文
摘要:
问题: 去除有序链表中重复的节点。 Example 1: Input: head = [1,1,2] Output: [1,2] Example 2: Input: head = [1,1,2,3,3] Output: [1,2,3] Constraints: The number of nodes 阅读全文
摘要:
问题: 将数组中的0移到末尾。 Example 1: Input: nums = [0,1,0,3,12] Output: [1,3,12,0,0] Example 2: Input: nums = [0] Output: [0] Constraints: 1 <= nums.length <= 1 阅读全文
摘要:
问题: 删除数组中的元素val。 返回剩下数组的size。 Example 1: Input: nums = [3,2,2,3], val = 3 Output: 2, nums = [2,2] Explanation: Your function should return length = 2, 阅读全文
摘要:
问题: 去除有序数组中重复的数字。 Example 1: Input: nums = [1,1,2] Output: 2, nums = [1,2] Explanation: Your function should return length = 2, with the first two ele 阅读全文