Here's my solution, which did not pass [1,1,2].

I guess this is a problem with initial value of int.min, but I don't know what else to do. Can anybody helps? Thanks so much

```
public int thirdMax(int[] nums) {
int first = Integer.MIN_VALUE;
int second = Integer.MIN_VALUE;
int third = Integer.MIN_VALUE;
for(int i = 0; i < nums.length; i++) {
if(nums[i] > first) {
third = second;
second = first;
first = nums[i];
} else if(nums[i] > second && nums[i] != first) {
third = second;
second = nums[i];
} else if(nums[i] > third && nums[i] != first && nums[i] != second) {
third = nums[i];
} else {
continue;
}
}
if(nums.length < 3) {
return first;
}
return third;
}
}
```