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

Commit 6787312

Browse files
refactor 540
1 parent be2b5a3 commit 6787312

File tree

1 file changed

+0
-15
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-15
lines changed

‎src/main/java/com/fishercoder/solutions/_540.java‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 540. Single Element in a Sorted Array
5-
*
6-
* Given a sorted array consisting of only integers where every
7-
* element appears twice except for one element which appears once.
8-
* Find this single element that appears only once.
9-
10-
Example 1:
11-
Input: [1,1,2,3,3,4,4,8,8]
12-
Output: 2
13-
Example 2:
14-
Input: [3,3,7,7,10,11,11]
15-
Output: 10
16-
Note: Your solution should run in O(log n) time and O(1) space.
17-
*/
183
public class _540 {
194
public static class Solution1 {
205
public int singleNonDuplicate(int[] nums) {

0 commit comments

Comments
(0)

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