摘要:
703 非常经典的一个题,假设有一个不断增加的序列,要求输出第K 大的数 215 太简单了,就不说了。 阅读全文
摘要:
Given a non-empty array of integers, return the k most frequent elements. Example 1: Example 2: Input: nums = [1], k = 1 Output: [1]非常经典的一道题,有以下几点:1. 阅读全文
摘要:
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). 阅读全文
摘要:
280 Given an unsorted array nums, reorder it in-place such that nums[0] <= nums[1] >= nums[2] <= nums[3].... Example: 方法二: 上面的方法是 nlogn解法, 如何寻求一个On 的解 阅读全文