Binary Tree Preorder Traversal 题目链接 题目要求: Given a binary tree, return thepreordertraversal of its nodes' values. For example: Given binary tree{1...
分类:
其他好文 时间:
2015-07-09 13:04:42
阅读次数:
91
https://leetcode.com/problems/minimum-depth-of-binary-tree/ 1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 ...
分类:
其他好文 时间:
2015-07-09 12:50:40
阅读次数:
102
https://leetcode.com/problems/populating-next-right-pointers-in-each-node/ 1 /** 2 * Definition for binary tree with next pointer. 3 * struct TreeLi.....
分类:
其他好文 时间:
2015-07-09 12:46:18
阅读次数:
91
Maximal SquareGiven a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the ...
分类:
其他好文 时间:
2015-07-09 12:41:13
阅读次数:
103
题目:
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
解题:
递归的还是和前面中...
分类:
编程语言 时间:
2015-07-09 11:16:06
阅读次数:
179
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ 2 5
/ \ 3 4 6
The flattened tree should look like:
1...
分类:
其他好文 时间:
2015-07-08 22:41:17
阅读次数:
187
题目链接 题目要求: Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree i...
分类:
其他好文 时间:
2015-07-08 22:28:32
阅读次数:
167
Binary Tree Level Order Traversal 题目链接 题目要求: Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, lev...
分类:
其他好文 时间:
2015-07-08 22:23:27
阅读次数:
156
% This function reads a siftgeo binary file %读取siftgeo格式的二进制文件%% Usage: [v, meta] = siftgeo_read (filename, maxdes)% filename the input filename%...
分类:
其他好文 时间:
2015-07-08 22:12:17
阅读次数:
130
题目链接 题目要求: Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows:The left subtree of a nod...
分类:
其他好文 时间:
2015-07-08 20:46:15
阅读次数:
134