由买买提看人间百态

topics

全部话题 - 话题: trees
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
q*c
发帖数: 17993
1
http://www.treewelldeepsnowsafety.com/
What exactly is a tree well?
Trees are an important and integral part of the natural mountain environment
. Thick stands of evergreen trees are common at ski resorts in the western U
.S. and Canada, predominantly in the ungroomed areas.
Most of the documented cases of deep snow suffocation at ski areas involve
people falling headfirst into a tree well.
A tree well is the hole or depression that forms around the base of a tree.
Evergreen trees (fir, hemlock,... 阅读全帖
q*c
发帖数: 17993
2
http://www.treewelldeepsnowsafety.com/
What exactly is a tree well?
Trees are an important and integral part of the natural mountain environment
. Thick stands of evergreen trees are common at ski resorts in the western U
.S. and Canada, predominantly in the ungroomed areas.
Most of the documented cases of deep snow suffocation at ski areas involve
people falling headfirst into a tree well.
A tree well is the hole or depression that forms around the base of a tree.
Evergreen trees (fir, hemlock,... 阅读全帖
K*********n
发帖数: 2852
3
我也写了一个C的:
Node *del(Node *tree, int n){
Node *tmpNode;
if (tree == NULL)
perror("Element not found.");
else if (tree -> val > n) // go left
tree -> left = del(tree -> left, n);
else if (tree -> val < n)
tree -> right = del(tree -> right, n);
else{ // found n
if (tree -> left && tree -> right){ // two children
tmpNode = findMin(tree -> right);
tree -> ... 阅读全帖
r***6
发帖数: 401
4
来自主题: Archery版 - Extreme-Height Tree Stand Tactics
http://www.gameandfishmag.com/2010/09/28/hunting_bowhunting-hun
By P.J. Reilly
One more tree to clear and he’s mine, I told myself as a magnificent 10-
pointer approached to within 20 yards of my tree stand. When the buck stuck
his head out from behind a maple sapling, I felt a tingle on the back of my
neck. The swirling wind had reversed direction, and it blew my scent right
to the deer.
Like a shot, the buck’s head was up and his coal-black eyes glared at me.
He tipped his head back so that hi... 阅读全帖
k**********4
发帖数: 16092
5
By the time Phyllis Bishop won the right to trim and clear her neighbors'
trees and regain the panoramic bay view from her Oakland hills home, 25
years had passed, her husband Lloyd had died, and she was living in a
retirement home.
Bishop, 95, sighed with relief at the victory of an epic legal and political
battle with her neighbors that went all the way to the state Supreme Court.
Yet, once the neighbors' trees were cleared this year, Bishop noticed that
city trees blocked the view from her pr... 阅读全帖
N******t
发帖数: 43
6
贴代码,如有错误,请私信。
/**
* Implement insert and delete in a trinary tree.
*
*/
public class TrinaryTree {
/**
* define a trinary tree's node
*
*/
static class TreeNode{
public int val; // node's value
public TreeNode left, right, mid; // represent left, right, middle
node
public TreeNode(int v){
this.val = v;
left = null;
right = null;
mid = null;
}
}
TreeNode root;

public TrinaryTre... 阅读全帖
G********r
发帖数: 3161
7
来自主题: LeisureTime版 - The Hanging Tree
今天刚刚看了Hunger Game Mockingjay 1,马上被这首歌吸引了,歌词真的很Tricky,
喜欢Jennifer不加修饰的原唱,与大家共赏。
"The Hanging Tree"
(with James Newton Howard)
Are you, are you
Coming to the tree?
They strung up a man
They say who murdered three.
Strange things did happen here
No stranger would it be
If we met at midnight
In the hanging tree.
Are you, are you
Coming to the tree?
Where dead man called out
For his love to flee.
Strange things did happen here
No stranger would it be
If we met at midnight
In the hanging tree.
Are you... 阅读全帖
b*****d
发帖数: 61690
8
http://abcnews.go.com/blogs/politics/2011/11/blowback-for-obama
Starting today, the government is imposing a 15-cent fee on most fresh-cut
Christmas trees, but before critics compare President Obama to the Grinch,
officials want to explain this is a growers’ arrangement to boost tree
sales. And they insist it is not a “tax.”
As the holidays approach, imported fresh trees will be assessed as they
cross the border, and American growers will ante up in February for each
fresh-cut Christmas tree sol... 阅读全帖
B*V
发帖数: 3365
9
http://abcnews.go.com/blogs/politics/2011/11/blowback-for-obama
Starting today, the government is imposing a 15-cent fee on most fresh-cut
Christmas trees, but before critics compare President Obama to the Grinch,
officials want to explain this is a growers’ arrangement to boost tree
sales. And they insist it is not a “tax.”
As the holidays approach, imported fresh trees will be assessed as they
cross the border, and American growers will ante up in February for each
fresh-cut Christmas tree sol... 阅读全帖
p*****2
发帖数: 21240
10
来自主题: JobHunting版 - 面试题总结(7) - Tree

Balanced Binary Tree
Binary Tree Level Order Traversal II
Maximum Depth of Binary Tree
Minimum Depth of Binary Tree
Same Tree
Symmetric Tree
Unique Binary Search Trees
Unique Binary Search Trees II
Pre-order, In-order, Post-order traversal
需要会recursive和iterative的两种实现方式。可惜Leetcode上只包含了In-order,有
些遗憾。
Tree的serialization/deserialization也是常常被考到的题目,这个Leetcode目前还
没有包含,当然套路还是DFS/BFS。
LinkedList和Binary Tree相互转换的题目。
Convert Sorted List to Binary Search Tree
Flatten Binary Tree to Linked List
(这题原题在CC150... 阅读全帖
l*****a
发帖数: 38403
11
来自主题: TrustInJesus版 - Origins of the Christmas Tree:
Pagan traditions: Many Pagan cultures used to cut boughs of evergreen trees
in December, move them into the home or temple, and decorate them. Modern-
day Pagans still do. This was to recognize the winter solstice -- the time
of the year that had the shortest daylight hours, and longest night of the
year. This occurs annually sometime between DEC-20 to 23; most often, it is
DEC-21. As the solstice approached, they noticed that the days were
gradually getting shorter; many feared that the sun wou... 阅读全帖
M***D
发帖数: 478
12
这种树之间的距离能代表什么?
比如tree A和tree B之间的距离是d1
tree A和tree C之间的距离是d1+delta
如果delta>0, 我们可以说tree C离 tree A更近吗?
也就是tree C更能反应tree A?
tree C 中的种群关系比 tree B中的种群关系 更接近 tree C?
c**y
发帖数: 172
13
I come up with some questions when considering the following problem. A
related discussion is found here
http://stackoverflow.com/questions/1017821/find-whether-a-tree- but I didn't find the answer to my particular questions.
Problem: given two binary trees T1 (large) and T2 (small), how do we check
whether or not T2 is a subtree of T1? Brutal force solution is out of scope
of this post. Another solution is as follows. A general idea is to serialize
T1 and T2 into two arrays A(T1) and A(T2) firs... 阅读全帖
x*******u
发帖数: 194
14
some trees are of the fast growing/shallow root system types, such as beech,
birch trees. it is not my 1st time to see some tall trees falling down
after a severe thunderstorm/tornado to lean against hosuehold items (
including the house and car) and block the traffic
if there are big tree trunk over hanging the house/drive way and sticking
out long, you don't want any dead limbs/branches to fall from the sky.
some old trees may look healthy from outside, but there could be holes
inside due to m... 阅读全帖
w*******y
发帖数: 60932
Y****g
发帖数: 662
16
来自主题: Military版 - Fake palm tree makes residents scared
Fake palm tree makes residents scared
http://realestate.aol.com/blog/2012/11/16/cell-towers-near-home
Cell Towers Near Homes? Battle in Mesa, Ariz., Typifies Fears Nationwide
By Krisanne Alcantara | Posted Nov 16th 2012 7:05PM
33 Comments
513376011
Share on Tumblr
Though palm trees evoke an idyllic desert oasis, that's hardly the case for
frustrated residents of Mesa, Ariz. That's because a "palm tree" set to be
planted in the Phoenix suburb isn't what it seems: It's a camouflaged
cellular tow... 阅读全帖
Z*****Z
发帖数: 723
17
来自主题: JobHunting版 - FB面试题:binary tree inorder successor
响应大侠号召。写了个直白板的,求拍。
static >Node next(Node tree, Node node) {
if(tree == null){
return null;
}
if(node.right != null){
Node tmp = node.right;
while(tmp.left != null){
tmp = tmp.left;
}
return tmp;
}
Stack> stk = new Stack>();
if(!searchNode(tree, node, stk)){
return null;
... 阅读全帖
x*****0
发帖数: 452
18
The question is:
Check if a binary tree is a valid binary search tree.
I guess I can pass the definition of the binary search tree in this forum. :
-). I know this is a very basic question and have a lot of solutions with O(
N) time complexity and O(1) space complexity.
Since I'm practicing how to use bottom-up traversal skill, Let's restrict
the answer must be bottom-up traversal algorithm.
The following is my idea.
Using "min" and "max" to represent the minimum value of left sub-tree and
maxim... 阅读全帖
r*********e
发帖数: 29495
19
【 以下文字转载自 Travel 讨论区 】
发信人: renaissance (ole), 信区: Travel
标 题: 世界的尽头,Joshua Tree国家公园
发信站: BBS 未名空间站 (Thu Dec 19 18:48:28 2013, 美东)
在一个冬日的早晨,阳光灿烂,温度是恰到好处。开车从棕榈泉(Palm Springs)出发
,沿着10号公路一路东进。10号公路,渐渐离开Coachella Valley山谷,更加荒凉的荒
原和丘陵出现在眼前。在168出口开车北上,从Joshua tree national park的公园的南
口进入。
Joshua tree,乔舒亚树,美国西南部所产龙舌兰科(Agavaceae)丝兰属沙漠植物。生有
剑形叶,簇生蜡白色花。茎可高达10余米。树的形状如同约书亚在伸手祈祷,故名。乔舒
亚树生长极为缓慢,最初5年约每年生长3英吋,然后每年约1.5英吋。这种树没有树轮,
因此树龄需以高度推算。http://farm4.staticflickr.com/3784/11444741054_a24dbd8
503_c.jpg
经过Cotto... 阅读全帖
x*****a
发帖数: 7797
20
【 以下文字转载自 BBI 讨论区 】
发信人: shall (莎啦啦), 信区: BBI
标 题: [bbi活动] My Awesome Tree House
发信站: BBS 未名空间站 (Fri Apr 6 14:51:41 2012, 美东)
http://www.youtube.com/watch?v=FRMd_xv7GYo
口音太重,不写出故事内容,就怕听不懂,这是故事:
I need a new tree house in the backyard. I promise I will clean my tree hous
e. I will also pay for the tree house. Then I will practice my addition, sub
traction and my multiplication facts. If you want to learn about starts I ca
n just go in the tree house and study store my toys in the tree house.
Yo... 阅读全帖
w*******y
发帖数: 60932
21
Peanuts Charlie Brown 18" Christmas Tree with "Linus Blanket" & Music - Reg.
$19.99, Sale $9.99 with Free Shipping at meijer.com You would pay any
sales tax. Today's "Elf Big Steal" thru 11/30/10
Deal LINKY:
http://www.meijer.com/s/peanuts-charlie-brown-tree-with-music/_/R-163494
Peanuts Charlie Brown Tree with Music
Good grief. Learn the true meaning of Christmas with Charlie Brown's classic
pathetic Christmas tree. Leave it bare or dress it up. All it really needs
is you! This tree is a repl... 阅读全帖
x*****0
发帖数: 452
22
I guess we can pass the definition of in-order and level-order traversal. :-
).
For example:
50
/ \
10 60
/ \ / \
5 20 55 70
/ / \
51 65 80
The in-order and level-order traversal of the above tree are:
5, 10, 20, 50, 51, 55, 60, 65, 70, 80
50, 10, 60, 5, 20, 55, 70, 51, 65, 80
My idea:
(1) traversal the level-order array to find out the first element which
appears in the in-order array. We call this element as current root.
(2) find the in... 阅读全帖
p*****2
发帖数: 21240
23
来自主题: JobHunting版 - 面试题总结(7) - Tree
http://blog.sina.com.cn/s/blog_b9285de20101j4qt.html
一直没有总结Tree,这次想总结一下结果却发现没有什么太多可以总结的。Leetcode上
tree的题目还是比较全面的。我做了一遍发现基本上跑不出三个套路:
1. Recursive DFS
2. Iterative DFS
3. BFS
有些tree的题目比较tricky一些,但是最终解法还是逃不出这三个套路,所以我觉得面
试的时候代码的质量就变得更加的重要了。因为没有什么太多总结的,下边就随便聊一
下了。
Leetcode上graph的题目涉及的很少,不过从算法和coding来说DFS,BFS完全适用于
tree和graph。因此,把tree的题目练好了,graph的多数题目应该也不会有什么问题才
对。当然graph涉及的算法比tree还是要多的,比如shortest
path,
toposort等等,但是DFS,BFS还是基本中的基本。因此做Leetcode上的tree的题目也相
当于练习了graph的题目了。
由于Tree的题目比较多,我感觉一些可以skip掉,如果时间不充... 阅读全帖
o****n
发帖数: 72
24
A Christmas tree doesn't care how many other Christmas trees
you have had in the past.
Christmas trees don't get mad if you use exotic electrical devices.
A Christmas tree doesn't care if you have an artificial one in the
closet.
You can feel a Christmas tree before you take it home.
A Christmas tree doesn't get mad if you look up underneath it.
When you are done with a Christmas tree,
you can throw it on the curb and have it hauled away.
A Christmas tree doesn't get jealous around other Christm
o****n
发帖数: 72
25
A Christmas tree is always erect.
Even small ones give satisfaction.
A Christmas tree stays up for 12 days and nights.
A Christmas tree always looks good - even with the lights on.
A Christmas tree is always happy with its size.
A Christmas tree has cute balls.
A Christmas tree doesn't get mad if you break one of its balls.
You can throw a Christmas tree out when it's past its 'sell by' date.
You don't have to put up with a Christmas tree all year.
v**********6
发帖数: 77
26
来自主题: SanDiego版 - PALM SPRINS 中餐馆 + JOSHUA TREE
JUOSHUA TREE 很漂亮啊。我们上周才去过
我写的日志,将就看看吧
美国的公园真不是一般的大,记得那年去evergland的时候,小朋友还想骑车逛,后来
发现连开车玩都可以玩好几天。
Joshua tree 不算太大,不过穿过公园开一次也要3.4个小时吧,再加上一堆一堆的
trails,想好好的耍透真要用上7天pass了。
想到去 Joshua tree是看到朋友的校内上在那里找的星空,实在是虚幻的有些奇妙。
于是周五晚上开车到 palm spring的 outlet 小逛了2个小时,什么都没买,就杀去
Joshua tree 的motel了。 路上有在朦胧的夜色中看到palm spring的风车。 晚上如愿
以偿的看到了星星,还对着sky walk 找了半天星座。只是遗憾相机实在是留不下美丽
的星空。
白天的Joshua tree又是另一番景象。 总结下来就两个字:“孤独”。 蓝天下,沙漠
中,joshua tree就在那里坚强的或者。 不过回来听新闻说因为全球变暖,Joshua
tree可能在100年之类绝迹。
从Joshua tree 出来,决定一路向南,开向el cen
r*********e
发帖数: 29495
27
在一个冬日的早晨,阳光灿烂,温度是恰到好处。开车从棕榈泉(Palm Springs)出发
,沿着10号公路一路东进。10号公路,渐渐离开Coachella Valley山谷,更加荒凉的荒
原和丘陵出现在眼前。在168出口开车北上,从Joshua tree national park的公园的南
口进入。
Joshua tree,乔舒亚树,美国西南部所产龙舌兰科(Agavaceae)丝兰属沙漠植物。生有
剑形叶,簇生蜡白色花。茎可高达10余米。树的形状如同约书亚在伸手祈祷,故名。乔舒
亚树生长极为缓慢,最初5年约每年生长3英吋,然后每年约1.5英吋。这种树没有树轮,
因此树龄需以高度推算。http://farm4.staticflickr.com/3784/11444741054_a24dbd8
503_c.jpg
经过Cottonwood游客中心,稍作休息。一路上游客稀少少,基本上是前不见古人,后不
见来者的状态。在这开阔的荒野中驾驶,有一种特殊的乐趣。
公园的南部,十分干燥,植被很少很少,经过让人惊叹不已的Cholla Cactus Garden仙
人掌花园之后,植被慢慢的开始增多。C... 阅读全帖
s***l
发帖数: 728
28
来自主题: BBI版 - [bbi活动] My Awesome Tree House
http://www.youtube.com/watch?v=FRMd_xv7GYo
口音太重,不写出故事内容,就怕听不懂,这是故事:
I need a new tree house in the backyard. I promise I will clean my tree hous
e. I will also pay for the tree house. Then I will practice my addition, sub
traction and my multiplication facts. If you want to learn about starts I ca
n just go in the tree house and study store my toys in the tree house.
You are not going to believe what my tree house looks like. My tree house wi
ll have a long ladder. My tee house will also have on... 阅读全帖
j****i
发帖数: 496
29
来自主题: Database版 - How to query a tree
Your question is a little bit vague.
Let's suppose you know the height of the query tree to be 3...
Select ID From Tree
Where ParentID In
(Select ID From Tree
Where ParentID In
(Select ID From Tree
Where ParentID = root
)
)
Union
Select ID From Tree
Where ParentID In
(Select ID From Tree
Where ParentID = root
)
Union
Select ID From Tree
Where ParentID = root
Union
Select ID From Tree
Where ID = root
It may be easier to implement this if you embed SQL into some prog
g*****g
发帖数: 34805
30
来自主题: Programming版 - java有没有现成的tree class?
Tree is a lower level data structure. In practice, list and map
are storage interfaces, tree is just a backing type. Also tree
has too many types, binary tree, B+ tree, etc. It's not practical
to have a generic tree that fits all. However, it's easy to
find the sample code for each type by googling.
In JDK, check TreeSet and TreeMap for a B&R tree implementation if that's
what you want.

file
tree
i*****e
发帖数: 218
31
来自主题: JobHunting版 - python, 怎么能把 tree存到 memory了 ?
大家过节好!
祝大家明年更好 !
向大家请教一个问题请:
python, 怎么能把 一个tree structure 存到 memory了, 方便后面的程序用 ?
具体的问题是:
有一个 tree T, 有几千个nodes 和 leaves, (不是 binary tree, 每一级可以有任
意多的 children, 每个nodes 和 leaves,上面存的 information是很少的), 后续
需要不断地往它上面添加新的nodes 和 leaves, 就像下面的 pseudo code:
# add new item, return updated tree
new_T = add_new_item(T, new_item_to_a_particular_location)
# add another new item, return updated tree
new_new_T = add_new_item(new_T, new_item_2_to_a_particular_location)
# add more new items,return updated tre... 阅读全帖
i*****e
发帖数: 218
32
来自主题: SanFrancisco版 - python, 怎么能把 tree存到 memory了 ?
大家过节好!
祝大家明年更好 !
向大家请教一个问题请:
python, 怎么能把 一个tree structure 存到 memory了, 方便后面的程序用 ?
具体的问题是:
有一个 tree T, 有几千个nodes 和 leaves, (不是 binary tree, 每一级可以有任
意多的 children, 每个nodes 和 leaves,上面存的 information是很少的), 后续
需要不断地往它上面添加新的nodes 和 leaves, 就像下面的 pseudo code:
# add new item, return updated tree
new_T = add_new_item(T, new_item_to_a_particular_location)
# add another new item, return updated tree
new_new_T = add_new_item(new_T, new_item_2_to_a_particular_location)
# add more new items,return updated tre... 阅读全帖
y****3
发帖数: 366
33
来自主题: Fashion版 - body shop tea tree 系列使用心得~~
本人是混合皮,额头隔三差五就冒出几个痘,虽然不严重但是不管他的话也要好几天才
好。我把tea tree系列的都快搬回家了,是本人试用过为数不多的化妆品系列之一。就
是前阵子店里搞活动的时候买的,30块钱6样然后还有个5块钱coupon,捡到白菜心里美
啊~~~~:)
第一次发带图的帖,技术不好轻拍。
Tea Tree Skin Clearing Facial Wash
这个用了挺好的,当时我问店员这个洗面gel跟foam的什么区别,他就说这个茶树油浓
度要比foam的高,建议买这个。用后果然比foam的要好很多,洗的更干净
Tea Tree Skin Clearing Foaming Cleanser
这个是之前买过的,因为觉得foam感觉更清爽一些,结果却不理想。总有洗不净的感觉
,是本人最不喜欢的洗面奶类型,就像倩碧的三部曲的洗面奶,extra mild洗完的感觉
就是不爽,而且还比gel贵2块钱,不建议买
Tea Tree Blemish Fade Night Lotion
买这个晚霜的原因就是这个最贵,18块,活动不是都5块嘛,店员说是新品,也不晓得。用后感觉非常好,也不知道是... 阅读全帖
a*******p
发帖数: 1955
34
来自主题: LeisureTime版 - 最近听了一首歌:The giving tree
"The Giving Tree"
All the leaves on the Giving Tree have fallen
No shade to crawl in underneath
I've got scars from a pocket knife
Where you carved your heart into me
If all you wanted was love
Why would you use me up
Cut me down, build a boat, and sail away
When all I wanted to be was your giving tree
Settle down, build a home, and make you happy?
I lie in the dead of night and I wonder
Whose covers you're between
And it's sad laying in his bed
You feel hollow, so you crawl home back to me
If a... 阅读全帖
i*****e
发帖数: 218
35
来自主题: Programming版 - python, 怎么能把 tree存到 memory了 ?
大家过节好!
祝大家明年更好 !
向大家请教一个问题请:
python, 怎么能把 一个tree structure 存到 memory了, 方便后面的程序用 ?
具体的问题是:
有一个 tree T, 有几千个nodes 和 leaves, (不是 binary tree, 每一级可以有任
意多的 children, 每个nodes 和 leaves,上面存的 information是很少的), 后续
需要不断地往它上面添加新的nodes 和 leaves, 就像下面的 pseudo code:
# add new item, return updated tree
new_T = add_new_item(T, new_item_to_a_particular_location)
# add another new item, return updated tree
new_new_T = add_new_item(new_T, new_item_2_to_a_particular_location)
# add more new items,return updated tre... 阅读全帖
w*******y
发帖数: 60932
36
Kohl's has three 4 ft. pre-lit Christmas trees for $12.00 shipped!
Use the following codes:
20% percent off: NEXTORDER20
Free Shipping: FREECCDEC
Green Pre-Lit Tree:
http://www.kohls.com/kohlsStore/furnitureandhomedecor/christmas/artificialtrees/PRD~702164/4ft Green Noble Pine PreLit Christmas Tree.jsp
White Pre-Lit Tree:
http://www.kohls.com/kohlsStore/furnitureandhomedecor/christmas/artificialtrees/PRD~722126/4ft White Pine PreLit Christmas Tree.jsp
Pink Pre-Lit Tree:
http://www.kohls.com/kohl... 阅读全帖
w*******y
发帖数: 60932
37
If you're looking for a tree to plant this Earth Day but can't bring
yourself to pay for one, try Lowe's. The home improvement retailer will be
handing out a million saplings this Saturday at its stores around the
country.
The trees are being given away in partnership with conservation group
American Forests. Lowe's says the types of tree at each of the company's 1,
725 stores have been selected to thrive in the local environment. They'll be
free while supplies last.
Each tree bag will have a ba... 阅读全帖
w*******y
发帖数: 60932
38
Link:
http://www.amazon.com/LEGO-Creator-Apple-Tree-House/dp/B002RL7V
Price drop. Still only 19% off, but just in case someone's been waiting for
it to drop, here you go.
Price comparisons per google:
https://www.google.com/search?q=lego apple tree house&ie=utf-8&oe=utf-8&aq=t
&rls=org.mozilla:en-US:official&client=firefox-a#q=lego apple tree house&hl=
en&safe=active&client=firefox-a&hs=hA3&rls=org.mozilla:en-US:official&prmd=
imvns&source=lnms&tbm=shop&ei=qrjfTp7_DLSK2QWpuNmnDQ&sa=X&oi=mode_li... 阅读全帖
w*******y
发帖数: 60932
39
This is fun and different-- the tracks mount to the tree so the train goes
around mid-tree (if that doesn't make sense, look at the pics on the website)
Christmas Tree Train Set:
http://shop.stagestores.com/catalog/product/view/id/141129/s/ch
Christmas Tree Train Set:
http://shop.stagestores.com/catalog/product/view/id/141129/s/ch
Use 35% off code 352511. Shipping is free ( daisybeetle)-- comes out to $8.
77
Details listed on the site:
Make Christmas special for the whole family!
* Includes 8 tr... 阅读全帖
w*******y
发帖数: 60932
40
Sign up for a 6 month membership to the Arbor Day Foundation for $10, and
they will send you 10 Free Trees that are appropriate for your growing
region, based on your zip code.
The trees are 6" to 12".
Shipping is free! You can have the trees shipped to you or someone else.
Link Here:
http://www.arborday.org/shopping/memberships/memberships.cfm?me
Membership also gives you 33-56% off on the purchase of more than 100
varieties of trees in their Tree Nursery Free and subscription their "Arbor
Da... 阅读全帖
b*****s
发帖数: 36
41
来自主题: JobHunting版 - 求教balanced binary tree的准确定义
我一直有个问题比较confused:
height-balanced 的定义到底是以下哪一种:
(1)Wikipedia上说:A balanced binary tree is commonly defined as a binary
tree in which the depth of the two subtrees of every node never differ by
more than 1。
(2)careercup书和Leetcode的balanced tree相关的题目上如此定义:A height-
balanced tree is a tree whose subtrees differ in height by no more than one
and the subtrees are height-balanced, too.
也就是说以下这个tree是符合(2)的要求而不符合(1)的要求。
1
/ \
2 2
/ \ / \
... 阅读全帖
t****a
发帖数: 1212
42
iterative solution:
函数is-symmetric-level评估每一层的value,检查是否是symmetric的。
函数bfs-step执行一步breath first search,返回下一层所有节点,包括nil在内
函数is-symmetric-iterative?迭代bfs-step直到某层所有节点为nil。之后从上到下检
查每一层。
(defn is-symmetric-level? [trees]
(let [values (map #(if (nil? %)
nil
(let [[l v r] %] v)) trees)]
(= values (reverse values))))
(defn bfs-step [trees]
(let [subtrees (mapcat #(if (nil? %)
[nil nil]
(let [[l... 阅读全帖
s******n
发帖数: 20
43
在leetcode看到Binary Tree Level Order Traversal II,看不出和Binary Tree
Level Order Traversal有什么根本区别,不知道考点在哪里?
我把Binary Tree Level Order Traversal的最终结果一颠倒不就得到Binary Tree
Level Order Traversal II.
Binary Tree Level Order Traversal的链接在这里:
http://discuss.leetcode.com/questions/49/binary-tree-level-orde
哪位大牛指点一下?先谢谢了。
f********a
发帖数: 165
44
来自主题: JobHunting版 - serialize n-ary tree 一问
是的,这是serialize binary tree.我的意思是要么binary tree不是n-ary tree的一
个特例,不然用geeksforgeeks链接里的方法得不到binary tree的正确序列化。但是链
接里又提到n-ary tree是binary tree的延伸,所以有些confused了。
q****6
发帖数: 837
45
来自主题: Living版 - My neighbor's tree
Sorry can't type English on this computer...
Don't know if anybody experienced this before. My neighbor's tree is growing
into our yard, which is not an issue for itself, but some part is pushing
my tree and my tree is showing the sign of dying. I asked tree company to
take a look, they said we need to trim back neighbor's tree and trim cost is
on us as customary. Any if my tree grow into my neighbor's yard they need
to trim, cost is on them. And legally speaking we can always trim the
portion t... 阅读全帖
t*******r
发帖数: 22634
46
MTV:
http://www.youtube.com/watch?v=7KL5eNc8sPQ
Live:
http://www.youtube.com/watch?v=7R8xb8FnrsE
Lyrics:
I'm sitting here in the boring room
It's just another rainy Sunday afternoon
I'm wasting my time
I got nothing to do
I'm hanging around
I'm waiting for you
But nothing ever happens and I wonder
I'm driving around in my car
I'm driving too fast
I'm driving too far
I'd like to change my point of view
I feel so lonely
I'm waiting for you
But nothing ever happens and I wonder
I wonder how
I wonde... 阅读全帖
w*******y
发帖数: 60932
47
Link:
http://www.walmart.com/ip/6.5-tree-bonus-tree/15567578
One Pre-Lit 6.5' Colorado White Artificial Christmas Tree
One Bonus Fiber Optic Tree
Pretty good deal. 2 trees for $40.66 (after tax) free ship to store.
Good time to use your iron man 2 e-card if you havn't
y*********e
发帖数: 518
48
来自主题: JobHunting版 - A tree question
分层遍历,也可以用 vector 。
void levelTraverse(Tree root) {
Vector thisLevel = new Vector();
Vector nextLevel = new Vector();
thisLevel.add(root);
while (!thisLevel.isEmpty()) {
foreach (Tree tree in thisLevel) {
print(tree);
nextLevel.addAll(tree.children());
}
thisLevel.clear();
thisLevel.addAll(nextLevel);
nextLevel.clear();
println();
}
}
j**y
发帖数: 462
49
Find the common ancestor of two nodes in a tree. The tree is not a binary
tree strictly in that the left node is less than the right node. Also this
solution should work for trees with three or four children. Provide both a
recursive and iterative solution.
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)