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
题目: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
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
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
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
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
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
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
题目:
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
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