2013年3月25日

摘要: 对于两个节点的最低父节点的定义可以分为两种情况(1)像5和8最低公共父节点是3,两节点之间不存在父子关系(2)两节点存在父子关系,如5和4,最低公共父节点是5。引用维基百科的话:Thelowest common ancestor(LCA) is a concept ingraph theoryandcomputer science. LetTbe a rootedtreewithnnodes. The lowest common ancestor between two nodesvandwis defined as the lowest node inTthat has bothvandwa 阅读全文
posted @ 2013-03-25 00:20 dyc0113 阅读(190) 评论(0) 推荐(0) 编辑

导航