- Source : Link
- Author : Han
- Date : 2022-01-05
Problems
Given an integer array nums, return the third distinct maximum number in this array. If the third maximum does not exist, return the maximum number.
Example 1
1 | |
Example 2
1 | |
Example 3
1 | |
Solution
1 | |
Given an integer array nums, return the third distinct maximum number in this array. If the third maximum does not exist, return the maximum number.
Example 1
1 | |
Example 2
1 | |
Example 3
1 | |
1 | |