码迷,mamicode.com
首页 >  
搜索关键字:binary tree depth    ( 24091个结果
[LeetCode] Search Insert Position [21]
解题思路 给一个排序数组和一个数,寻找该数在数组的位置或者插入位置。本题考查的还是二分查找。二分查找返回的结果就是该数在数组中该插入的位置。 代码实现...
分类:其他好文   时间:2014-06-11 00:55:14    阅读次数:205
Maximal Rectangle
题目 Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area. 方法 使用两个矩阵,分别记录每一行连续的1的个数以及每一列连续的1的个数。 public int maximalRec...
分类:其他好文   时间:2014-06-11 00:24:51    阅读次数:343
leetcode - Maximum Depth of Binary Tree
题目:Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the ro...
分类:其他好文   时间:2014-06-10 10:09:13    阅读次数:237
json tree
下载源码:http://files.cnblogs.com/Mr-Joe/tree.zip
分类:Web程序   时间:2014-06-10 09:58:11    阅读次数:187
【leetcode】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-06-10 00:54:41    阅读次数:313
[leetcode]Scramble String @ Python
原题地址:https://oj.leetcode.com/problems/scramble-string/题意:Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty su...
分类:编程语言   时间:2014-06-09 19:02:59    阅读次数:197
二叉树链式存储结构
二叉链表的C语言描述基本运算的算法——建立二叉链表、先序遍历二叉树、中序遍历二叉树、后序遍历二叉树、后序遍历求二叉树深度#include#includeusing namespace std;class Tree{private: struct Node { char da...
分类:其他好文   时间:2014-06-09 18:39:49    阅读次数:310
Sentiment Analysis(1)-Dependency Tree-based Sentiment Classification using CRFs with Hidden Variables
The content is from this paper:Dependency Tree-based Sentiment Classification using CRFs with Hidden Variables, byTetsuji Nakagawa.A typical approach ...
分类:其他好文   时间:2014-06-09 16:39:56    阅读次数:421
DHTMLX 常用技术
GRID的行设置前景色和背景色$dataItem->set_row_color("red"); // 设置背景色 $dataItem->set_row_style("color:red"); // 设置前景色GRID支持多行显示mygrid.enableMultiline(true);TREE节点提...
分类:Web程序   时间:2014-06-09 15:23:45    阅读次数:245
[leetcode] 22.Same Tree
同是递归简单题public class Solution { public boolean isSameTree(TreeNode p, TreeNode q) { boolean flag = true; if(p == null && q == null) ...
分类:其他好文   时间:2014-06-09 13:46:23    阅读次数:275
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!