摘要: 1 """ 2 Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors i 阅读全文
posted @ 2020-02-18 23:01 yawenw 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Given a non-empty array of integers, return the k most frequent elements. 3 Example 1: 4 Input: nums = [1,1,1,2,2,3], k = 2 5 Output: [1,2] 6 阅读全文
posted @ 2020-02-18 22:59 yawenw 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 1 """ 2 Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. 阅读全文
posted @ 2020-02-18 22:58 yawenw 阅读(134) 评论(0) 推荐(0) 编辑