暴力可过。。。 重新看了下快速选择。。 1 #include<cstdio> 2 #include<iostream> 3 #include<cstring> 4 #include<algorithm> 5 #include<cstdlib> 6 using namespace std; 7 con ...
分类:
其他好文 时间:
2016-06-18 18:39:01
阅读次数:
180
Kth Largest TimeLimit: 1 Second MemoryLimit: 32 Megabyte Description There are two sequences A and B with N (1<=N<=10000) elements each. All of the el ...
分类:
其他好文 时间:
2016-06-15 23:45:49
阅读次数:
276
题目链接:https://leetcode.com/problems/pascals-triangle-ii/
题目:
Given an index k, return the kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1].
Note:
Could you opt...
分类:
其他好文 时间:
2016-06-12 02:11:39
阅读次数:
115
Kth Largest Element in an Array
Total Accepted: 59659 Total
Submissions: 175932 Difficulty: Medium
Find the kth largest element in an unsorted array. Note that it is the kth la...
分类:
其他好文 时间:
2016-06-12 02:01:21
阅读次数:
126
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 exam ...
分类:
其他好文 时间:
2016-06-05 06:35:26
阅读次数:
164
题目链接:https://leetcode.com/problems/kth-largest-element-in-an-array/
题目:
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kt...
分类:
其他好文 时间:
2016-06-02 13:52:20
阅读次数:
126
题目描述: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ ...
分类:
其他好文 时间:
2016-06-02 12:59:37
阅读次数:
98