码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
Binary Tree Preorder Traversal (非递归实现)
具体思路参见:二叉树的非递归遍历(转)/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int...
分类:其他好文   时间:2014-11-10 11:47:59    阅读次数:157
[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.Solution: 1 public class Solution...
分类:其他好文   时间:2014-11-10 06:32:28    阅读次数:202
cmake使用示例与整理总结
本文源码托管于github上cmake_demo cmake中一些预定义变量 PROJECT_SOURCE_DIR 工程的根目录PROJECT_BINARY_DIR 运行cmake命令的目录,通常是${PROJECT_SOURCE_DIR}/buildCMAKE_INCLUDE_PATH 环境变量,非cmake变量CMAKE_LIBRARY_PATH 环境变量CMAKE_CURRE...
分类:其他好文   时间:2014-11-10 01:11:21    阅读次数:294
排名算法
#include#includeusing namespace std;struct BinaryTree{ int count;// 该节点的孩子总数 int from_score; int to_score; BinaryTree* left; BinaryTree* right; Binary...
分类:编程语言   时间:2014-11-10 01:01:41    阅读次数:214
Sum Root to Leaf Numbers
Sum Root to Leaf Numbers  Total Accepted: 26533 Total Submissions: 89186My Submissions Question  Solution  Given a binary tree containing digits from 0-9 only, each root-to-leaf pa...
分类:其他好文   时间:2014-11-09 23:53:10    阅读次数:244
[LeetCode] 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-09 23:41:43    阅读次数:201
Print all nodes at distance k from a given node
Given a binary tree, a target node in the binary tree, and an integer value k, print all the nodes that are at distance k from the given target node. ...
分类:其他好文   时间:2014-11-09 23:30:26    阅读次数:235
LeetCode Minimum Depth of Binary Tree 找最小深度(返回最小深度)
题意:找到离根结点最近的叶子结点的那一层(设同一层上的结点与根结点的距离相等),返回它所在的层数。方法有:1、递归深度搜索2、层次搜索方法一:递归(无优化) 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * i...
分类:其他好文   时间:2014-11-09 22:12:11    阅读次数:184
Construct a tree from Inorder and Level order traversals
Given inorder and level-order traversals of a Binary Tree, construct the Binary Tree. Following is an example to illustrate the problem.BinaryTreeInpu...
分类:其他好文   时间:2014-11-09 20:41:07    阅读次数:196
利用mysql的binlog恢复数据
MySQL Binary Log也就是常说的bin-log, ,是mysql执行改动产生的二进制日志文件,其主要作用有两个: * 数据回复 * 主从数据库。用于slave端执行增删改,保持与master同步。 1.开启binary log功能 ???? 需要修改...
分类:数据库   时间:2014-11-09 16:44:59    阅读次数:312
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!