码迷,mamicode.com
首页 >  
搜索关键字:spoj balnum balanced    ( 1777个结果
[leetcode] 6. Balanced Binary Tree
这个题目纠结了一会儿,终于从二叉树转化到AVL了。题目如下:Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a ...
分类:其他好文   时间:2014-11-13 12:41:02    阅读次数:157
Leetcode-Convert Sorted Array to BST
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.Solution: 1 /** 2 * Definition for binary tree 3 * .....
分类:其他好文   时间:2014-11-09 00:58:31    阅读次数:213
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-11-09 00:55:08    阅读次数:250
Leetcode-Convert Sorted List to BST.
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.Solution: 1 /** 2 * Definition for singl....
分类:其他好文   时间:2014-11-09 00:52:30    阅读次数:316
SPOJ 962 Intergalactic Map
Intergalactic MapTime Limit: 6000msMemory Limit: 262144KBThis problem will be judged onSPOJ. Original ID:IM64-bit integer IO format:%lld Java class na...
分类:其他好文   时间:2014-11-08 23:25:16    阅读次数:350
Balanced Binary Tree (二叉树DFS)
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-11-06 19:27:14    阅读次数:227
Balanced Binary Tree
这几天A的都是二叉树的,如果输的基本操作掌握了,用递归很好解决这些题目的。这个可能不是最好的解法,明天再去Discuss看看有没有好的解法Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For t...
分类:其他好文   时间:2014-11-05 22:57:24    阅读次数:261
SPOJ 913 Query on a tree II ( 树链剖分 + 倍增 )
树链剖分 + 倍增...
分类:其他好文   时间:2014-11-05 21:32:54    阅读次数:234
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. 1 /** 2 * Definition for singly-linked ....
分类:其他好文   时间:2014-11-03 23:53:07    阅读次数:185
POJ Balanced Lineup(RMQ_ST)
POJ Balanced Lineup(RMQ_ST)...
分类:其他好文   时间:2014-11-03 22:30:54    阅读次数:251
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!