2020年9月19日

消失的两个数字(1-N缺两个数)

摘要: 给定一个数组,包含从 1 到 N 所有的整数,但其中缺了两个数字。你能在 O(N) 时间内只用 O(1) 的空间找到它们吗? 以任意顺序返回这两个数字均可。 示例 1: 输入: [1]输出: [2,3]示例 2: 输入: [2,3]输出: [1,4]提示: nums.length <= 30000 阅读全文

posted @ 2020-09-19 18:06 wsw_seu 阅读(593) 评论(0) 推荐(0) 编辑

47. Permutations II

摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. Example: Input: [1,1,2] Output: [ [1,1,2], [1,2, 阅读全文

posted @ 2020-09-19 16:52 wsw_seu 阅读(71) 评论(0) 推荐(0) 编辑

137. Single Number II

摘要: Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one. Note: Your al 阅读全文

posted @ 2020-09-19 16:05 wsw_seu 阅读(72) 评论(0) 推荐(0) 编辑

导航