码迷,mamicode.com
首页 >  
搜索关键字:lowest    ( 451个结果
PAT1036. Boys vs Girls
This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. Inp...
分类:其他好文   时间:2015-02-04 09:22:01    阅读次数:150
1036. Boys vs Girls
1036. Boys vs Girls (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis time you are asked to tell the difference between the lowest gr...
分类:其他好文   时间:2015-02-03 14:57:25    阅读次数:142
Misc. - Lowest common ancestor - post-order traversal solution
Details not refined yet..struct Ret{ Ret(TreeNode *p, Mask rm) : pVal(p), m(rm){} TreeNode *pVal; Mask m;};class Solution {public: Ret lca...
分类:其他好文   时间:2015-01-27 07:03:07    阅读次数:193
[Twitter] Lowest Level Common Ancestor
Question:Inabinaryintegervaluetree,findthelowestlevelcommonancestoroftwovalues.http://www.glassdoor.com/Interview/In-a-binary-integer-value-tree-find-the-lowest-level-common-ancestor-of-two-values-QTN_219955.htm//classTreeNode{ //intval; //TreeNodeleft; //T..
分类:其他好文   时间:2015-01-16 08:44:40    阅读次数:190
Next Permutation -- leetcode
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible o...
分类:其他好文   时间:2015-01-09 14:22:04    阅读次数:201
[C++]LeetCode: 79 Next Permutation (下一个排列,常见面试题)
题目: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest p...
分类:编程语言   时间:2015-01-08 18:11:48    阅读次数:322
HDU2028 Lowest Common Multiple Plus【stein算法】【水题】
思路:没有用欧几里得算法来求,用的是stein算法试一下。最大公约数、 最小公倍数的欧几里得算法和stein算法参考博文: http://blog.csdn.net/lianai911/article/details/42003903...
分类:编程语言   时间:2015-01-03 13:16:59    阅读次数:221
Lowest Common Ancestor of a Binary Tree
Given a binary tree, find the lowest common ancestor of two given nodes in the tree.Node* LCA(Node* root, Node* p, Node* q){ if (root == NULL || p ...
分类:其他好文   时间:2014-12-17 01:35:37    阅读次数:124
Lowest Common Ancestor of a Binary Tree, with Parent Pointer
Given a binary tree, find the lowest common ancestor of two given nodes in tree. Each node contains a parent pointer which links to its parent.int get...
分类:其他好文   时间:2014-12-17 01:28:42    阅读次数:152
Lowest Common Ancestor of a Binary Search Tree (BST)
Given a binary search tree(BST), find the lowest common ancestor of two given nodes in the BST.Node* LCA(Node* root, Node* p, Node* q){ if (!root |...
分类:其他好文   时间:2014-12-17 00:13:50    阅读次数:172
451条   上一页 1 ... 40 41 42 43 44 ... 46 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!