码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
04-1. Root of AVL Tree (25)
04-1. Root of AVL Tree (25) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue An AVL tree is a self-balancing binary sea...
分类:其他好文   时间:2014-12-29 18:28:43    阅读次数:193
Root of AVL Tree
原题: An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalanci...
分类:其他好文   时间:2014-12-29 18:24:07    阅读次数:154
HappyLeetcode37:Add Binary
Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 这道题挺简单的,不多说了,代码奉上 class Solution { publ...
分类:移动开发   时间:2014-12-29 15:00:32    阅读次数:209
Leetcode:Binary Tree Level Order Traversal
Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2...
分类:其他好文   时间:2014-12-29 13:43:28    阅读次数:132
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-12-29 13:42:53    阅读次数:158
Leetcode:Binary Tree Level Order Traversal II
Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa...
分类:其他好文   时间:2014-12-29 13:36:27    阅读次数:109
【LeetCode】Binary Tree Upside Down
Binary Tree Upside DownGiven a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent nod...
分类:其他好文   时间:2014-12-29 13:30:29    阅读次数:105
[LeetCode]109.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. 【分析】 无 【代码】 在下面超时的代码上进行改进:把链表先转换为vector再进行操作。 [LeetCode]108.Convert Sorted Ar...
分类:其他好文   时间:2014-12-29 12:14:29    阅读次数:124
Balanced Binary Tree
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/42218839 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 of the two subtrees o...
分类:其他好文   时间:2014-12-29 09:03:54    阅读次数:134
LeetCode--Same Tree
题目: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 解决方...
分类:其他好文   时间:2014-12-28 23:47:47    阅读次数:394
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!