码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
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 i...
分类:其他好文   时间:2014-11-27 17:44:31    阅读次数:140
[Leetcode]Validate Binary Search Tree
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key.Th...
分类:其他好文   时间:2014-11-27 16:30:19    阅读次数:226
[LeetCode]Binary Tree Level Order Traversal II
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For example: Given binary tree {3,9,20,#,#,15,7}, ...
分类:其他好文   时间:2014-11-27 16:14:23    阅读次数:184
【LeetCode】Construct Binary Tree from Preorder and Inorder Traversal 解题报告
【原题】 Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. 【解析】 题意:根据二叉树先序遍历和中序遍历的结果,构造二叉树。跟 根据中序遍历和后序遍历结...
分类:其他好文   时间:2014-11-27 12:50:15    阅读次数:155
sql中binary_checksum(*)的用法
sql中binary_checksum(*)的用法(转)binary_checksum(*)可以用来检查修改过的行。同一行在update后,该行的binary_checksum(*)就不同。 如select title_id,binary_checksum(*) from titles where ...
分类:数据库   时间:2014-11-27 12:39:43    阅读次数:193
【LeetCode】Construct Binary Tree from Inorder and Postorder Traversal 解题报告
【题目】 Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. 【解析】 题意:根据二叉树中序遍历和后序遍历的结果,构造该二叉树。 首先明确一下,中序遍...
分类:其他好文   时间:2014-11-27 10:48:01    阅读次数:117
LeetCode[Tree]: Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). Recursive Algorithm class Solution { public: bool isSymmetric(TreeNode *root) { return ...
分类:其他好文   时间:2014-11-27 09:18:04    阅读次数:176
leetcode-Minimum Depth of Binary Tree
leetcode-Minimum Depth of Binary Tree...
分类:其他好文   时间:2014-11-27 09:16:04    阅读次数:248
leetcode-Path Sum
Path Sum  Total Accepted: 31405 Total Submissions: 104326My Submissions Question  Solution  Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that add...
分类:其他好文   时间:2014-11-27 09:15:36    阅读次数:151
CC150 4.1
4.1Implementafunctiontocheckifatreeisbalanced.Forthepurposesofthisquestion,abalancedtreeisdefinedtobeatreesuchthatnotwoleafnodesdifferindistancefromtherootbymorethanone.Abalancedtree?http://en.wikipedia.org/wiki/Self-balancing_binary_search_treeIteratethetr..
分类:其他好文   时间:2014-11-27 08:03:52    阅读次数:190
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!