V2EX  ›  英汉词典
Enqueued related words: Lowest Common Ancestor

Ancestor Node

定义 Definition

ancestor node(祖先节点):在树(tree)或层级结构中,位于某个节点之上、并且从根节点到该节点路径上出现的任何节点(通常不包括该节点自身)。常见于计算机科学中的树结构、DOM、文件系统等语境。(也常说 an ancestor of a node。)

发音 Pronunciation (IPA)

/ˈæn.ses.tɚ noʊd/

例句 Examples

An ancestor node of this folder is the root directory.
这个文件夹的一个祖先节点是根目录。

In a binary tree, checking whether one node is an ancestor node of another helps determine their relationship and is useful for problems like finding the lowest common ancestor.
在二叉树中,判断一个节点是否为另一个节点的祖先节点有助于确定它们的关系,并常用于求“最近公共祖先”等问题。

词源 Etymology

ancestor 源自拉丁语 antecessor,意为“走在前面的人、前辈”,由 *ante-*(在前)+ cedere(行走)构成;node 源自拉丁语 nodus,意为“结、节点”。组合成 ancestor node 后,语义直观地表示“在层级/路径上更靠前的节点”。

相关词 Related Words

文学与典籍 Notable Works

  • Introduction to Algorithms(Cormen, Leiserson, Rivest, Stein,《算法导论》):在树与图相关章节中频繁使用“ancestor/descendant of a node”等概念来定义层级关系与路径性质。
  • The Algorithm Design Manual(Steven S. Skiena,《算法设计手册》):讨论树结构、遍历与相关问题时使用祖先/后代节点关系来表述约束与解法。
  • Discrete Mathematics and Its Applications(Kenneth H. Rosen,《离散数学及其应用》):在树与递归结构的章节中以“ancestor/descendant”描述节点间的层级关系。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   870 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 17:47 · PVG 01:47 · LAX 09:47 · JFK 12:47
♥ Do have faith in what you're doing.