Third Maximum Element Leetcode Java