码迷,mamicode.com
首页 >  
搜索关键字:balanced lineup    ( 929个结果
[Leetcode][Tree][Balanced Binary Tree]
判断一棵树是不是平衡二叉树,之前做过,还有点印象,用一个函数返回树的高度,如果是-1的话,就说明子树不平衡。1A很开心~ 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * T...
分类:其他好文   时间:2014-07-07 13:56:05    阅读次数:180
Problem Balanced Binary Tree
Problem Description:Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tre...
分类:其他好文   时间:2014-07-07 13:27:35    阅读次数:207
[leetcode] Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
分类:其他好文   时间:2014-07-03 19:10:40    阅读次数:201
[leetcode] Balanced Binary Tree
Given a binary tree, determine if it is height-balanced.
分类:其他好文   时间:2014-07-03 19:00:17    阅读次数:188
[leetcode] Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
分类:其他好文   时间:2014-07-03 18:55:48    阅读次数:236
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-28 10:07:19    阅读次数:208
poj 3264 Balanced Lineup
DescriptionFor the daily milking, Farmer John'sNcows (1 ≤N≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game o...
分类:其他好文   时间:2014-06-28 09:32:17    阅读次数:200
Leetcode Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.TreeNode *createSearchTree(ListNode *&hea...
分类:其他好文   时间:2014-06-26 00:12:57    阅读次数:289
LeetCode Balanced Binary Tree
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(...
分类:其他好文   时间:2014-06-24 13:32:40    阅读次数:157
[LeetCode] Convert Sorted Array to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.说明:平衡二叉搜索树,即任何结点的左子树和右子树高度最多相差1的二叉搜索树。二叉搜索树:二叉查找树(Bin...
分类:其他好文   时间:2014-06-21 00:47:08    阅读次数:221
929条   上一页 1 ... 87 88 89 90 91 ... 93 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!