码迷,mamicode.com
首页 >  
搜索关键字:trees    ( 1351个结果
Binary Tree
Description Background  Binary trees are a common data structure in computer science. In this problem we will look at an infinite binary tree where the nodes contain a pair of integers. Th...
分类:其他好文   时间:2014-08-01 19:39:52    阅读次数:207
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-08-01 13:48:11    阅读次数:183
HDU 1505 City Game
Problem Description Bob is a strategy game programming specialist. In his new city building game the gaming environment is as follows: a city is built up by areas, in which there are streets, trees...
分类:其他好文   时间:2014-08-01 10:54:28    阅读次数:315
Unique Binary Search Trees II leetcode java
题目: Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.For example,Given n = 3, your program should return....
分类:编程语言   时间:2014-08-01 04:53:31    阅读次数:279
Unique Binary Search Trees leetcode java
题目:Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique B....
分类:编程语言   时间:2014-08-01 04:53:11    阅读次数:272
[leetcode]Same Tree
Same TreeGiven two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally ide...
分类:其他好文   时间:2014-07-31 23:15:00    阅读次数:201
Same Tree leetcode java
题目: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 identica....
分类:编程语言   时间:2014-07-31 02:24:15    阅读次数:211
poj 2418 -- Hardwood Species
Hardwood SpeciesTime Limit: 10000MSMemory Limit: 65536KTotal Submissions: 18174Accepted: 7206DescriptionHardwoods are the botanical group of trees tha...
分类:其他好文   时间:2014-07-29 17:19:42    阅读次数:215
LeetCode Unique Binary Search Trees II
class Solution {private: vector res;public: vector generateTrees(int n) { res.clear(); res = dfs(1, n + 1); return res; ...
分类:其他好文   时间:2014-07-27 23:28:19    阅读次数:195
uva 122 - Trees on the level(一棵看着书都写不利索的树……)
#include #include #include #include #include #include using namespace std; const int maxn = 1000; char s[maxn]; bool failed; vector ans; struct node { bool have_value; int v; node *left,*...
分类:其他好文   时间:2014-07-27 11:54:43    阅读次数:198
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!