https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/#/solutions http://www.cnblogs.com/EdwardLiu/p/6109080.html Solution 2 : Binary ...
分类:
其他好文 时间:
2017-06-22 00:16:28
阅读次数:
131
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 ...
分类:
其他好文 时间:
2017-06-19 14:23:58
阅读次数:
201
https://leetcode.com/problems/pascals-triangle-ii/#/solutions Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, ...
分类:
其他好文 时间:
2017-06-12 22:32:13
阅读次数:
209
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 ? BST's ...
分类:
其他好文 时间:
2017-06-12 00:42:23
阅读次数:
175
https://leetcode.com/problems/kth-smallest-element-in-a-bst/#/description ...
分类:
其他好文 时间:
2017-06-09 10:07:16
阅读次数:
149
题目描述 给定一颗二叉搜索树,请找出其中的第k大的结点。例如, 5 / \ 3 7 /\ /\ 2 4 6 8 中,按结点数值大小顺序第三个结点的值为4。 1 /* 2 struct TreeNode { 3 int val; 4 struct TreeNode *left; 5 struct Tr ...
分类:
其他好文 时间:
2017-06-08 10:28:54
阅读次数:
149
1 - Follow up in Code Interview kth-smallest-number-in-sorted-matrix Find the kth smallest number in at row and column sorted matrix. [ [1 ,5 ,7], [3 ...
分类:
编程语言 时间:
2017-06-06 12:59:16
阅读次数:
774
@2017.06.04 Follow up in Code Interview 401 - kth-smallest-number-in-sorted-matrix 排序数组,即每一行每一列都是排好序的 类似于之前做的那道题,对这种排序数组,是从左上角往右下角看的。 每次pop一个最小值直到找到kt ...
分类:
其他好文 时间:
2017-06-04 19:53:37
阅读次数:
269
Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Note that it is th ...
分类:
其他好文 时间:
2017-06-04 09:48:32
阅读次数:
188