11. Brief Tour of the Standard Library – Part II
11.1. Output Formatting
11.2. Templating
11.3. Working with Binary Data Record Layouts
11.4....
分类:
编程语言 时间:
2014-12-11 23:44:13
阅读次数:
340
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the...
分类:
其他好文 时间:
2014-12-11 20:49:19
阅读次数:
177
标题:Same Tree通过率:42%难度简单Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are st...
分类:
其他好文 时间:
2014-12-11 20:48:26
阅读次数:
164
Path Sum IIGiven a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tr...
分类:
其他好文 时间:
2014-12-11 20:36:17
阅读次数:
205
判定一棵二叉树是不是二叉平衡树。链接:https://oj.leetcode.com/problems/balanced-binary-tree/题目描述:Given a binary tree, determine if it is height-balanced.For this problem...
分类:
其他好文 时间:
2014-12-11 18:56:57
阅读次数:
162
思路:把数字排序,排序后数字列,中间点为父节点,左边部分为左子树,右边为右子树。
假设节点定义为:
// Definition for binary tree
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), ...
分类:
其他好文 时间:
2014-12-11 12:31:45
阅读次数:
126
题目大意:输入一颗二叉树,将它按从上到下、从左到右的顺序输出各个节点位置。
思路:先根据输入的字符串将二叉树建立起来(注:可能出现不能建立的情况),若能
成功建立,则用宽度优先搜索(BFS)的方法遍历所有节点,并在遍历的时候,把结果
存下来,然后进行输出。
注意:BFS需要用到队列。...
分类:
其他好文 时间:
2014-12-11 10:30:15
阅读次数:
205
原文链接 http://blog.csdn.net/yaochunnian/article/details/7261006grep 文件报错 “Binary file ... matches” 原因:文件为binary文件解决:strings vers.log.2010-03-09 | grep ....
分类:
其他好文 时间:
2014-12-10 22:48:31
阅读次数:
178
Sum Root to Leaf NumbersGiven a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-l...
分类:
其他好文 时间:
2014-12-10 22:42:43
阅读次数:
166
UVA - 10250
The Other Two Trees
Time Limit: 3000MS
Memory Limit: Unknown
64bit IO Format: %lld & %llu
Submit Status
Description
Problem E
The Other Two Trees
Input: st...
分类:
其他好文 时间:
2014-12-10 21:23:53
阅读次数:
263