Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 20, 2024. It is now read-only.

Commit 16d4c14

Browse files
added problem68
1 parent 07cf0e9 commit 16d4c14

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

‎problem68/README.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# 136. Single Number
2+
3+
Given a non-empty array of integers nums, every element appears twice except for one. Find that single one.
4+
5+
You must implement a solution with a linear runtime complexity and use only constant extra space.
6+
7+
8+
## Example 1:
9+
10+
Input: nums = [2,2,1]
11+
Output: 1
12+
13+
## Example 2:
14+
15+
Input: nums = [4,1,2,1,2]
16+
Output: 4
17+
18+
## Example 3:
19+
20+
Input: nums = [1]
21+
Output: 1
22+
23+
24+
## Constraints:
25+
26+
1 <= nums.length <= 3 * 104
27+
-3 * 104 <= nums[i] <= 3 * 104
28+
Each element in the array appears twice except for one element which appears only once.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /