Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:
其他好文 时间:
2014-10-28 07:02:27
阅读次数:
171
问题描述:
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20,#,#,...
分类:
其他好文 时间:
2014-10-27 21:21:00
阅读次数:
190
detecting locked tables mysql (locked by LOCK TABLE)up vote15down votefavorite7I would like to know whether there is an option to detect locked tables...
分类:
数据库 时间:
2014-10-27 21:09:44
阅读次数:
307
Problem DescriptionThe highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at wh...
分类:
其他好文 时间:
2014-10-27 17:29:51
阅读次数:
170
1. PythonOf course you will need Python. Still Python 2.7 is preferred, however if you would like to create new projects with Python 3, it is also fin...
分类:
系统相关 时间:
2014-10-27 14:19:53
阅读次数:
283
#define DIV_ROUND_UP(x,y) (((x) + ((y) - 1)) / (y))1、问题 x、y都是整数,且x > 1, y > 1,求 x / y的向上取整,即: 当 x / y整除时,向上取整值为 x / y; 当x / y不整除时,向上取整值为(x / y) + 1...
分类:
其他好文 时间:
2014-10-27 14:17:24
阅读次数:
307
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2014-10-26 21:10:30
阅读次数:
170
Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2014-10-26 17:04:21
阅读次数:
193
Follow up for N-Queens problem.
Now, instead outputting board configurations, return the total number of distinct solutions.
class Solution {
private:
int res;
public:
int totalNQuee...
分类:
其他好文 时间:
2014-10-26 15:43:03
阅读次数:
168
问题描述:
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree...
分类:
其他好文 时间:
2014-10-26 13:11:29
阅读次数:
177