码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
LEETCODE -- Populating Next Right Pointers in Each Node
Populating Next Right Pointers in Each NodeGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLi...
分类:其他好文   时间:2014-11-20 01:26:49    阅读次数:145
Linux 各目录的作用
/bin/ ,/sbin/,/usr/bin/,/usr/sbin/ 这四个目录都是和命令相关的目录,Liunx下命令就是一个可执行的二进制文件,这四个目录都有一个bin,binary的简写 二进制的意识。linux下绝大多数的命令都在这四个目录下/bin/ 存放系统命令的目录,普通用户和超级用户都...
分类:系统相关   时间:2014-11-20 01:25:42    阅读次数:269
Balanced Binary Tree 判断平衡二叉树
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:其他好文   时间:2014-11-20 01:16:54    阅读次数:172
Maximum Depth of Binary Tree 树的最大深度
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...
分类:其他好文   时间:2014-11-19 23:46:55    阅读次数:247
leetcode[85] Maximal Rectangle
给定一个只含0和1的数组,求含1的最大矩形面积。Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.这样的题一般看来都...
分类:其他好文   时间:2014-11-19 23:44:02    阅读次数:316
Same Tree 深度优先
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an...
分类:其他好文   时间:2014-11-19 20:18:28    阅读次数:143
Symmetric Tree 深度优先搜索
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:其他好文   时间:2014-11-19 20:16:39    阅读次数:190
Path Sum 深度搜索
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-11-19 20:16:31    阅读次数:152
Flatten Binary Tree to Linked List
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:其他好文   时间:2014-11-19 18:31:49    阅读次数:137
[leetcode]Binary Tree Upside Down
= =买了书才能做的题。。。就是按说明来搞就行了,没啥算法。。。注意要把以前的left,right设置为nullptr,不然就是有环了,代码中加黑部分。/** * Definition for binary tree * struct TreeNode { * int val; * ...
分类:其他好文   时间:2014-11-19 18:19:19    阅读次数:168
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!