码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
Leetcode:Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:其他好文   时间:2015-01-02 22:15:05    阅读次数:307
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 an...
分类:其他好文   时间:2015-01-02 21:08:27    阅读次数:163
Leetcode:Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:其他好文   时间:2015-01-02 21:07:27    阅读次数:155
Leetcode:Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:其他好文   时间:2015-01-02 21:01:15    阅读次数:184
Leetcode:Populating Next Right Pointers in Each Node 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-01-02 18:45:09    阅读次数:149
Leetcode:Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:其他好文   时间:2015-01-02 17:27:08    阅读次数:116
[LeetCode]108 Convert Sorted Array to Binary Search Tree
https://oj.leetcode.com/problems/convert-sorted-array-to-binary-search-tree/http://fisherlei.blogspot.com/2013/03/leetcode-convert-sorted-array-to-binary.html/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNod..
分类:其他好文   时间:2015-01-02 16:19:16    阅读次数:151
[LeetCode]109 Convert Sorted List to Binary Search Tree
https://oj.leetcode.com/problems/convert-sorted-list-to-binary-search-tree/http://fisherlei.blogspot.com/2013/01/leetcode-convert-sorted-list-to-binary.htmlhttp://blog.csdn.net/worldwindjp/article/details/39722643/** *Definitionforsingly-linkedlist. *public..
分类:其他好文   时间:2015-01-02 16:17:43    阅读次数:215
Leetcode: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-01-02 15:50:53    阅读次数:107
Leetcode:Path Sum
Given 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 sum.Fo...
分类:其他好文   时间:2015-01-02 15:50:42    阅读次数:124
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!