码迷,mamicode.com
首页 >  
搜索关键字:marked ancestor    ( 861个结果
Unique Paths
A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ...
分类:其他好文   时间:2015-01-19 22:27:00    阅读次数:150
【BST】判断节点r和s是不是一个为祖先,另一个为后代
题目:EPI 书上的代码我认为有错。我的代码如下所示,时间复杂度为O(h),h为二叉树的高度。 //该函数不允许r和s为nullptr,且要求r、m、s三个指针互不相等 bool is_r_s_descendant_and_ancestor(shared_ptr r, shared_ptr m, shared_ptr s) { if (m == nullptr || r == nul...
分类:其他好文   时间:2015-01-18 14:27:37    阅读次数:265
[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
LeetCode-Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the ...
分类:其他好文   时间:2015-01-15 23:56:23    阅读次数:294
LeetCode-Unique Paths II
Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space is marked as 1 and 0 respectively in the ...
分类:其他好文   时间:2015-01-15 23:54:55    阅读次数:206
Leetcode:Unique Paths
A robot is located at the top-left corner of amxngrid (marked 'Start' in the diagram below).The robot can only move either down or right at any point ...
分类:其他好文   时间:2015-01-13 22:55:24    阅读次数:195
LeetCode--Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to reach the ...
分类:其他好文   时间:2015-01-12 16:41:29    阅读次数:144
[LeetCode] Unique Paths && Unique Paths II && Minimum Path Sum (动态规划之 Matrix DP )
Unique Paths https://oj.leetcode.com/problems/unique-paths/ A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram b...
分类:其他好文   时间:2015-01-11 21:30:24    阅读次数:319
[C++]LeetCode: 78 Unique Paths II
题目: Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space is marked as 1 and 0 respectively...
分类:编程语言   时间:2015-01-08 15:29:48    阅读次数:162
CF 19C 思维题STL应用
http://codeforces.com/problemset/problem/19/C Once Bob saw a string. It contained so many different letters, that the letters were marked by numbers, but at the same time each letter ...
分类:其他好文   时间:2015-01-07 23:36:29    阅读次数:221
861条   上一页 1 ... 77 78 79 80 81 ... 87 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!