由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - C++ Q85: How to find common parent in a tree. (转载)
相关主题
C++ Q85: How to find common parent in a tree.
相关话题的讨论汇总
话题: tree话题: q85话题: c++
进入Programming版参与讨论
1 (共1页)
c**********e
发帖数: 2007
1
【 以下文字转载自 JobHunting 讨论区 】
发信人: careerchange (Stupid), 信区: JobHunting
标 题: C++ Q85: How to find common parent in a tree.
发信站: BBS 未名空间站 (Fri Sep 16 22:31:09 2011, 美东)
Find the nearest common parent to two given nodes in a tree.
a***y
发帖数: 2803
2
tree也分很多种吧?

【在 c**********e 的大作中提到】
: 【 以下文字转载自 JobHunting 讨论区 】
: 发信人: careerchange (Stupid), 信区: JobHunting
: 标 题: C++ Q85: How to find common parent in a tree.
: 发信站: BBS 未名空间站 (Fri Sep 16 22:31:09 2011, 美东)
: Find the nearest common parent to two given nodes in a tree.

c**********e
发帖数: 2007
3
How to do it in a binary search tree?

【在 a***y 的大作中提到】
: tree也分很多种吧?
c*******h
发帖数: 1096
4
http://en.wikipedia.org/wiki/Lowest_common_ancestor
我照着第2个external link里面说的写了一个,挺容易写的

【在 c**********e 的大作中提到】
: 【 以下文字转载自 JobHunting 讨论区 】
: 发信人: careerchange (Stupid), 信区: JobHunting
: 标 题: C++ Q85: How to find common parent in a tree.
: 发信站: BBS 未名空间站 (Fri Sep 16 22:31:09 2011, 美东)
: Find the nearest common parent to two given nodes in a tree.

1 (共1页)
进入Programming版参与讨论
相关主题
C++ Q85: How to find common parent in a tree.
相关话题的讨论汇总
话题: tree话题: q85话题: c++