码迷,mamicode.com
首页 >  
搜索关键字:lintcode    ( 1584个结果
LintCode "Wood Cut"
Binary search. Please not data types and some details.class Solution {public: /** *@param L: Given n pieces of wood with length L[i] *@para...
分类:其他好文   时间:2015-10-07 12:12:05    阅读次数:184
[Lintcode] Inorder Successor in BST
Inorder Successor in BSTGiven a binary search tree and a node in it, find the in-order successor of that node in the BST.ExampleGiven tree =[2,1]and n...
分类:其他好文   时间:2015-10-07 06:18:13    阅读次数:171
[Lintcode] Validate Binary Search Tree
Validate Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtre...
分类:其他好文   时间:2015-10-07 00:58:16    阅读次数:269
LintCode "Expression Evaluation"
This is sth. for me to learn..https://github.com/kamyu104/LintCode/blob/master/C++/expression-evaluation.cpp
分类:其他好文   时间:2015-10-06 15:22:55    阅读次数:605
[Lintcode] Balanced Binary Tree
Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tre...
分类:其他好文   时间:2015-10-06 12:49:38    阅读次数:201
[lintcode] Binary Tree Inorder Traversal
Binary Tree Inorder TraversalGiven a binary tree, return theinordertraversal of its nodes' values.ExampleGiven binary tree{1,#,2,3}, 1 \ 2 ...
分类:其他好文   时间:2015-10-06 11:38:28    阅读次数:137
LintCode "Find Peak Element II"
Idea is the same: climbing up the hill along one edge (Greedy)! Visualize it in your mind!class Solution {public: /** * @param A: An integer ma...
分类:其他好文   时间:2015-10-06 08:05:31    阅读次数:150
[LintCode] Permuation Index
Given a permutation which contains no repeated number, find its index in all the permutations of these numbers, which are ordered in lexicographical o...
分类:其他好文   时间:2015-10-05 14:15:28    阅读次数:149
LintCode "Remove Node in Binary Search Tree"
Not hard to find a solution, but there are several corner cases.class Solution {public: /** * @param root: The root of the binary search tree. ...
分类:其他好文   时间:2015-10-05 07:02:21    阅读次数:259
LintCode "Delete Digits"
Greedy: remove earliest down-edge: like "54", "97".class Solution {public: /** *@param A: A positive integer which has N digits, A is a string....
分类:其他好文   时间:2015-10-05 01:55:06    阅读次数:215
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!