Statement
Given an integer array, nums, determine and return the third distinct maximum element in the array. If the array contains fewer than three distinct elements, return the maximum element instead.
Constraints:
nums.lengthnums[i]
Given an integer array, nums, determine and return the third distinct maximum element in the array. If the array contains fewer than three distinct elements, return the maximum element instead.
Constraints:
nums.length
nums[i]
Given an integer array, nums, determine and return the third distinct maximum element in the array. If the array contains fewer than three distinct elements, return the maximum element instead.
Constraints:
nums.length
nums[i]