Skip to content

Commit b4a04aa

Browse files
refactor 414
1 parent c470ce6 commit b4a04aa

File tree

1 file changed

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

1 file changed

+0
-26
lines changed

Diff for: src/main/java/com/fishercoder/solutions/_414.java

-26
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 414. Third Maximum Number
5-
*
6-
* Given a non-empty array of integers, return the third maximum number in this array.
7-
* If it does not exist, return the maximum number. The time complexity must be in O(n).
8-
9-
Example 1:
10-
Input: [3, 2, 1]
11-
12-
Output: 1
13-
14-
Explanation: The third maximum is 1.
15-
Example 2:
16-
Input: [1, 2]
17-
18-
Output: 2
19-
20-
Explanation: The third maximum does not exist, so the maximum (2) is returned instead.
21-
Example 3:
22-
Input: [2, 2, 3, 1]
23-
24-
Output: 1
25-
26-
Explanation: Note that the third maximum here means the third maximum distinct number.
27-
Both numbers with value 2 are both considered as second maximum.
28-
*/
293
public class _414 {
304

315
public static class Solution1 {

0 commit comments

Comments
 (0)