码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
LeetCode Add Binary
1.题目Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".2.解答class Solution { public: char intToChar(int input){ char strBuffer[1] = {0...
分类:其他好文   时间:2015-05-02 16:37:23    阅读次数:110
【LeetCode OJ】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. 解题思路:这题...
分类:其他好文   时间:2015-05-02 16:36:20    阅读次数:104
Unique Binary Search Trees II -- leetcode
iven n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n = 3, your program should return all 5 unique BST's shown below. 1 3 ...
分类:其他好文   时间:2015-05-02 16:35:48    阅读次数:138
【LeetCode OJ】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...
分类:其他好文   时间:2015-05-02 16:32:51    阅读次数:116
Same Tree
https://leetcode.com/problems/same-tree/Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equ...
分类:其他好文   时间:2015-05-02 13:38:23    阅读次数:137
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. 题意:二叉树前、中序构造出二叉树。 思路:经典的题目。 /** * Definition for a bin...
分类:其他好文   时间:2015-05-02 11:17:03    阅读次数:174
【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 / \ 2 2...
分类:其他好文   时间:2015-05-02 11:06:18    阅读次数:118
12. binary search Trees
12. binary search Trees The search tree data structure supports many dynamic-set operations,including search ,minimum,maximum,predecessor,successor ,i...
分类:其他好文   时间:2015-05-01 23:45:21    阅读次数:263
[LeetCode]*106.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....
分类:其他好文   时间:2015-05-01 20:00:19    阅读次数:188
Codeforces Round #300 - Quasi Binary(贪心)
Quasi Binary Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Description A number is called quasibinary if its decimal representation contai...
分类:其他好文   时间:2015-05-01 17:27:06    阅读次数:136
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!