摘要: 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. For example,Given [3,2,1,5,6,4] and k = 2, return 5. Note:... 阅读全文
posted @ 2015-11-22 19:29 dylqt 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [−2,1,−3,4,−1,2,1,−5,4],the contiguous subarray [4,−1,2,1] has the... 阅读全文
posted @ 2015-11-22 15:16 dylqt 阅读(116) 评论(0) 推荐(0) 编辑
摘要: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the bot... 阅读全文
posted @ 2015-11-22 12:21 dylqt 阅读(236) 评论(0) 推荐(0) 编辑