找重复/找单数
文章平均质量分 76
LQCUN
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
260. Single Number III
Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements that appear only once.For example:Given nums = [1,...原创 2018-02-09 14:42:32 · 122 阅读 · 0 评论 -
448. Find All Numbers Disappeared in an Array
Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once.Find all the elements of [1, n] inclusive that do not appear in this array.Could yo...原创 2018-02-11 13:49:27 · 140 阅读 · 0 评论 -
389. Find the Difference
Given two strings s and t which consist of only lowercase letters.String t is generated by random shuffling string s and then add one more letter at a random position.Find the letter that was added in...原创 2018-02-11 15:10:27 · 112 阅读 · 0 评论 -
442. Find All Duplicates in an Array
Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appeartwice and others appear once.Find all the elements that appear twice in this array.Could you do it without extra原创 2018-02-06 19:54:35 · 92 阅读 · 0 评论 -
540. Single Element in a Sorted Array
Given a sorted array consisting of only integers where every element appears twice except for one element which appears once. Find this single element that appears only once.Example 1:Input: [原创 2018-02-06 20:12:15 · 141 阅读 · 0 评论 -
136. Single Number(重)
Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using extra原创 2018-02-07 10:19:13 · 120 阅读 · 0 评论
分享