码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
Count Complete Tree Nodes || LeetCode1
/** * Definition for a binary tree node. * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */#define ...
分类:其他好文   时间:2015-06-10 14:08:26    阅读次数:100
MySQL中的string类型
转自:http://computer.uoh.edu.cn/mysql/1677.htmlMYSQL中STRING支持类型有:CHAR、VARCHAR、TINYTEXT、TEXT、MEDIUMTEXT、LONGTEXT、BINARY、VARBINARY、TINYBLOG、MEDIUMBLOG、BLO...
分类:数据库   时间:2015-06-10 13:50:47    阅读次数:171
[leetcode] Validate Binary Search Tree
Validate Binary Search TreeGiven a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtre...
分类:其他好文   时间:2015-06-10 12:03:48    阅读次数:89
Binary Tree Maximum Path Sum
Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:其他好文   时间:2015-06-10 12:03:48    阅读次数:88
Populating Next Right Pointers in Each Node I or II
Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any binary tree? Would your previous solution stil...
分类:其他好文   时间:2015-06-10 11:45:22    阅读次数:101
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...
分类:其他好文   时间:2015-06-10 07:41:49    阅读次数:105
Balanced Binary Tree
超简洁的代码本来考虑是不是真的要每个点求一个maxDepth,看来是的哟public class Solution { public boolean isBalanced(TreeNode root) { if (root==null) return true; i...
分类:其他好文   时间:2015-06-10 06:35:56    阅读次数:88
Minimum Depth of Binary Tree
就recursive做,简单题public class Solution { public int minDepth(TreeNode root) { if(root==null) return 0; if (root.left==null && root.righ...
分类:其他好文   时间:2015-06-10 06:35:28    阅读次数:138
Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.题解完全抄自ref的说明,感谢!“题解:先复习下什么是二叉搜索树(引自Wikipedia):二叉查找树(B...
分类:其他好文   时间:2015-06-10 06:33:38    阅读次数:112
Path Sum I, II
简单题IGiven 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 su...
分类:其他好文   时间:2015-06-10 06:33:31    阅读次数:101
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!