码迷,mamicode.com
首页 >  
搜索关键字:smallest sub-array    ( 590个结果
Project Euler:Problem 87 Prime power triples
The smallest number expressible as the sum of a prime square, prime cube, and prime fourth power is 28. In fact, there are exactly four numbers below fifty that can be expressed in such a way: 28...
分类:其他好文   时间:2015-07-23 21:50:50    阅读次数:210
Kth Smallest Element in a BST
Given a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is always valid, 1 ≤ k ≤ BST's tota...
分类:其他好文   时间:2015-07-23 13:47:56    阅读次数:90
leetCode(46):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 ≤ BST's total elements.         直观地一想,查找第k小的数,不就是...
分类:其他好文   时间:2015-07-22 16:22:04    阅读次数:87
LeetCode 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 ≤ BST's total elements.Follow up:What if the BST is modifi...
分类:其他好文   时间:2015-07-19 16:32:18    阅读次数:137
Codeforces Round #277.5 (Div. 2)——C贪心—— Given Length and Sum of Digits
You have a positive integermand a non-negative integers. Your task is to find the smallest and the largest of the numbers that have lengthmand sum of ...
分类:其他好文   时间:2015-07-16 21:59:17    阅读次数:144
Kth Smallest Element in a BST
Given a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is always valid, 1 ≤ k ≤ BST's tota...
分类:其他好文   时间:2015-07-15 18:33:34    阅读次数:80
codeforce 124B——全排列dfs——Permutations
You are givennk-digit integers. You have to rearrange the digits in the integers so that the difference between the largest and the smallest number wa...
分类:其他好文   时间:2015-07-15 01:17:15    阅读次数:244
Project Euler:Problem 62 Cubic permutations
The cube, 41063625 (3453), can be permuted to produce two other cubes: 56623104 (3843) and 66430125 (4053). In fact, 41063625 is the smallest cube which has exactly three permutations of its digits ...
分类:其他好文   时间:2015-07-14 18:21:53    阅读次数:113
【Kth Smallest Element in a BST 】cpp
题目:Given a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is always valid, 1 ≤ k ≤ BST's t...
分类:其他好文   时间:2015-07-14 15:13:55    阅读次数:98
Kth Smallest Element in a BST
class Solution {public: int kthSmallest(TreeNode* root, int k) { int num = 0; TreeNode*pNode=NULL; visit(root, k, num, pNode);...
分类:其他好文   时间:2015-07-14 15:01:24    阅读次数:82
590条   上一页 1 ... 42 43 44 45 46 ... 59 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!