Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2015-06-15 00:07:45
阅读次数:
142
参考http://wiki.ros.org/ROS/Tutorials/NavigatingTheFilesystemUsing rospackExample:$ rospack find roscppWould return:YOUR_INSTALL_PATH/share/roscppUsing ...
分类:
其他好文 时间:
2015-06-14 22:41:09
阅读次数:
127
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen...
分类:
其他好文 时间:
2015-06-14 22:40:37
阅读次数:
123
You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a concatena...
分类:
其他好文 时间:
2015-06-14 22:38:16
阅读次数:
129
#include
bool find(int x){
int i,j;
for(j=1;j
if(line[x][j]==true && uesd[j]==false)
///如果有暧昧并且还没有标记过(这里标记的意思是这次查找试图改变过该妹子的归属问题,但是没有成功,所以就不用瞎折腾功夫了)
{
...
分类:
编程语言 时间:
2015-06-14 21:30:13
阅读次数:
178
Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen...
分类:
其他好文 时间:
2015-06-14 19:58:09
阅读次数:
129
Given an arraySofnintegers, find three integers inSsuch that the sum is closest to a given number, target. Return the sum of the three integers. You m...
分类:
其他好文 时间:
2015-06-14 19:53:23
阅读次数:
135
A peak element is an element that is greater than its neighbors.
Given an input array where num[i] ≠ num[i+1], find a peak element and return
its index.
The array may contain multiple peaks, i...
分类:
其他好文 时间:
2015-06-14 18:40:44
阅读次数:
108
原题
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histogram where...
分类:
其他好文 时间:
2015-06-14 18:36:43
阅读次数:
102
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the following triangle[
[2],
[3,4],
[6,5,7],...
分类:
其他好文 时间:
2015-06-14 18:36:11
阅读次数:
136