2017年6月7日

(leetcode题解)Array Partition I

摘要: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of 阅读全文

posted @ 2017-06-07 19:42 kiplove 阅读(167) 评论(0) 推荐(0) 编辑

(leetcode题解)Merge Sorted Array

摘要: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that nums1 has enough space (size tha 阅读全文

posted @ 2017-06-07 16:41 kiplove 阅读(149) 评论(0) 推荐(0) 编辑

(leetcode题解)Top K Frequent Elements

摘要: Given a non-empty array of integers, return the k most frequent elements. For example,Given [1,1,1,2,2,3] and k = 2, return [1,2]. Note: You may assum 阅读全文

posted @ 2017-06-07 15:51 kiplove 阅读(189) 评论(0) 推荐(0) 编辑

导航