Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n).
Example 1:
Example 2:
Example 3:
wx62ea2466cca9a 博主文章分类:leetcode ©著作权
文章标签 leetcode-java ide 文章分类 运维
Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexity must be in O(n).
Example 1:
Example 2:
Example 3:
上一篇:415. Add Strings
下一篇:412. Fizz Buzz
psql窗口函数的使用
给你一个非空数组,返回此数组中 第三大的数 。如果不存在,则返回数组中最大的数。示例 1:示例 2:示例 3:提示:Code:
给你一个非空数组,返回此数组中 第三大的数。如果不存在,则返回数组中最大的数。
My Solution: Highest votes in discussion
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M