Movatterモバイル変換


[0]ホーム

URL:


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

Commit40ad1e9

Browse files
refactor 1133
1 parent477317d commit40ad1e9

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

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

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,6 @@
22

33
importjava.util.TreeMap;
44

5-
/**
6-
* 1133. Largest Unique Number
7-
*
8-
* Given an array of integers A, return the largest integer that only occurs once.
9-
* If no integer occurs once, return -1.
10-
*
11-
* Example 1:
12-
* Input: [5,7,3,9,4,9,8,3,1]
13-
* Output: 8
14-
* Explanation:
15-
* The maximum integer in the array is 9 but it is repeated. The number 8 occurs only once, so it's the answer.
16-
*
17-
* Example 2:
18-
* Input: [9,9,8,8]
19-
* Output: -1
20-
* Explanation:
21-
* There is no number that occurs only once.
22-
*
23-
* Note:
24-
* 1 <= A.length <= 2000
25-
* 0 <= A[i] <= 1000
26-
* */
275
publicclass_1133 {
286
publicstaticclassSolution1 {
297
publicintlargestUniqueNumber(int[]A) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp