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 (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
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
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
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
题目:
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
思路:没有用欧几里得算法来求,用的是stein算法试一下。最大公约数、
最小公倍数的欧几里得算法和stein算法参考博文:
http://blog.csdn.net/lianai911/article/details/42003903...
分类:
编程语言 时间:
2015-01-03 13:16:59
阅读次数:
221
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
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
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