码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
leetcode dfs Minimum Depth of Binary Tree
Minimum Depth of Binary Tree  Total Accepted: 25609 Total Submissions: 86491My Submissions Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the ...
分类:其他好文   时间:2014-10-11 17:41:25    阅读次数:151
leetcode - 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. class Solution { public: int largestRectangleArea(int* height, int length) { ...
分类:其他好文   时间:2014-10-11 17:37:26    阅读次数:156
Printing a Binary Tree in Level Orders
BFS:Is it possible that a solution exists using only one single queue? Yes, you bet. The single queue solution requires two extra counting variables w...
分类:其他好文   时间:2014-10-11 03:37:04    阅读次数:190
MySQL中bin-log使用
操作命令:show binlog events in 'mysql-bin.000016' limit 10;reset master 删除所有的二进制日志flush logs 产生一个新的binlog日志文件show master logs; 或者 show binary logs; 查看二进制....
分类:数据库   时间:2014-10-10 23:46:24    阅读次数:356
Leetcode:convert_sorted_array_to_binary_search_tree
BST的中序遍历是一个sorted-array,再构造回去成一个BST,先将中间的元素作为根节点,这个节点的左右分别是左子树和右子树。如此递归地进行即可。...
分类:其他好文   时间:2014-10-10 02:19:43    阅读次数:173
Leetcode:balanced_binary_tree
判断给定的二叉树是否是平衡二叉树,即每一个节点的深度相差不大于1...
分类:其他好文   时间:2014-10-10 01:29:03    阅读次数:194
mysql 备份软件 Xtrabackup 的 xtrabackup_binlog_pos_innodb和xtrabackup_binlog_info 文件区别
今天在操作 innobackupex 的时候,执行 change master to 的时候发现 xtrabackup_binlog_pos_innodb xtrabackup_binlog_info 两个文件对应的master 的 binary log 位置不一致:less xtrabackup....
分类:数据库   时间:2014-10-09 22:51:47    阅读次数:201
Binary Tree Maximum Path Sum [leetcode] dp
a(i):以节点i作为终点的单边最大路径和 b(i):以节点i作为终点的双边边最大路径和 a(i) = max{ i->val, i->val + max{a(i->left), a(i->right) }}; b(i) = max{ i->val, i->val + max{a(i->left), a(i->right) } , i->val + a(i->left) + a(...
分类:其他好文   时间:2014-10-09 22:49:47    阅读次数:141
Binary Tree Maximum Path Sum
[leetcode]Given a binary tree, find the maximum path sum....
分类:其他好文   时间:2014-10-09 16:29:28    阅读次数:161
Balanced Binary Tree
[leetcode]Given a binary tree, determine if it is height-balanced....
分类:其他好文   时间:2014-10-09 16:25:48    阅读次数:132
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!