码迷,mamicode.com
首页 >  
搜索关键字:kth    ( 692个结果
Leet Code OJ 119. Pascal's Triangle II [Difficulty: Easy]
题目: 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 optimize your algorithm to use only O(k) extra space?翻译: 给定一个下标k,返回第...
分类:其他好文   时间:2016-03-22 15:06:03    阅读次数:172
【BZOJ1503】 [NOI2004]郁闷的出纳员 splay
splay模板题,都快把我做忧郁了。 由于自己调两个坑点。 1.删除时及时updata 2.Kth 考虑k满足该点的条件即r->ch[1]->size+1<=k && r->ch[1]->size+r->num>=k OIER公司是一家大型专业化软件公司,有着数以万计的员工。作为一名出纳员,我的任务
分类:其他好文   时间:2016-03-21 21:34:49    阅读次数:297
Pascal&#39;s 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 optimize your algorithm to
分类:其他好文   时间:2016-03-14 12:13:00    阅读次数:134
C#解leetcode:119. Pascal's 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 optimize your algorithm
分类:Windows程序   时间:2016-03-13 19:34:13    阅读次数:225
LeetCode OJ 215. Kth Largest Element in an Array 堆排序求解
题目链接:https://leetcode.com/problems/kth-largest-element-in-an-array/ 215. Kth Largest Element in an Array My Submissions Question Total Accepted: 43442 Total Submissions: 136063 D...
分类:编程语言   时间:2016-02-24 09:41:19    阅读次数:279
LeetCode-230. Kth Smallest Element in a BST
Description: 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,
分类:其他好文   时间:2016-02-20 00:30:11    阅读次数:179
algorithm@ find kth smallest element in two sorted arrays (O(log n time)
The trivial way, O(m + n): Merge both arrays and the k-th smallest element could be accessed directly. Merging would require extra space of O(m+n). Th
分类:其他好文   时间:2016-02-08 04:53:47    阅读次数:381
【HDOJ】4426 Palindromic Substring
综合性很强的一道题目,结合manacher,后缀数组,哈希,RMQ,二分可解。基本思路是通过manacher可以找到所有可能的回文串,哈希去重,后缀数组二分找数目。最后暴力求解。需要注意kth需要为__int64。 1 /* 4426 */ 2 #include <iostream> 3 #incl
分类:其他好文   时间:2016-02-05 01:49:59    阅读次数:177
Kth Largest Element in an Array -- LeetCode
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-01-31 09:35:56    阅读次数:179
【树】Kth Smallest Element in a BST(递归)
题目: 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 ≤ B
分类:其他好文   时间:2016-01-29 16:05:13    阅读次数:141
692条   上一页 1 ... 45 46 47 48 49 ... 70 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!