什么情况下不存在第三大的数?
》1.所有元素全部一样
》2.只有两种元素
复杂度nlogn
class Solution {
public int thirdMax(int[] nums) {
//什么情况下不存在第三大的数?
//1.所有元素全部一样
//2.只有两种元素
Set set=new HashSet();
for(int i=0;i 
什么情况下不存在第三大的数?
》1.所有元素全部一样
》2.只有两种元素
复杂度nlogn
class Solution {
public int thirdMax(int[] nums) {
//什么情况下不存在第三大的数?
//1.所有元素全部一样
//2.只有两种元素
Set set=new HashSet();
for(int i=0;i