Problem
Java
my solution
1 | class Solution { |
Submission Detail
- 26 / 26 test cases passed.
- Runtime: 1 ms, faster than 90.82% of Java online submissions for Third Maximum Number.
- Memory Usage: 39.2 MB, less than 7.88% of Java online submissions for Third Maximum Number.
PriorityQueue and HashSet
1 | import java.util.*; |
Submission Detail
- 26 / 26 test cases passed.
- Runtime: 5 ms, faster than 21.06% of Java online submissions for Third Maximum Number.
- Memory Usage: 38.7 MB, less than 10.02% of Java online submissions for Third Maximum Number.
TreeSet
1 | import java.util.*; |
Submission Detail
- 26 / 26 test cases passed.
- Runtime: 4 ms, faster than 39.33% of Java online submissions for Third Maximum Number.
- Memory Usage: 38.6 MB, less than 10.02% of Java online submissions for Third Maximum Number.
javascript
1 | /** |
Submission Detail
- 26 / 26 test cases passed.
- Runtime: 80 ms, faster than 72.32% of JavaScript online submissions for Third Maximum Number.
- Memory Usage: 38.9 MB, less than 5.00% of JavaScript online submissions for Third Maximum Number.