Parent pointer tree (nonfiction): Difference between revisions

From Gnomon Chronicles
Jump to navigation Jump to search
(Created page with "In [{Computer science (nonfiction)|computer science]], an '''in-tree''' or '''parent pointer tree''' is an N-ary tree data structure in which each node has a pointer to its pa...")
 
No edit summary
Line 1: Line 1:
In [{Computer science (nonfiction)|computer science]], an '''in-tree''' or '''parent pointer tree''' is an N-ary tree data structure in which each node has a pointer to its parent node, but no pointers to child nodes. When used to implement a set of stacks, the structure is called a spaghetti stack, cactus stack or saguaro stack (after the saguaro, a kind of cactus). Parent pointer trees are also used as disjoint-set data structures.
In [[Computer science (nonfiction)|computer science]], an '''in-tree''' or '''parent pointer tree''' is an N-ary tree data structure in which each node has a pointer to its parent node, but no pointers to child nodes. When used to implement a set of stacks, the structure is called a spaghetti stack, cactus stack or saguaro stack (after the saguaro, a kind of cactus). Parent pointer trees are also used as disjoint-set data structures.


The structure can be regarded as a set of singly linked lists that share part of their structure, in particular, their tails. From any node, one can traverse to ancestors of the node, but not to any other node.
The structure can be regarded as a set of singly linked lists that share part of their structure, in particular, their tails. From any node, one can traverse to ancestors of the node, but not to any other node.

Revision as of 09:36, 23 November 2020

In computer science, an in-tree or parent pointer tree is an N-ary tree data structure in which each node has a pointer to its parent node, but no pointers to child nodes. When used to implement a set of stacks, the structure is called a spaghetti stack, cactus stack or saguaro stack (after the saguaro, a kind of cactus). Parent pointer trees are also used as disjoint-set data structures.

The structure can be regarded as a set of singly linked lists that share part of their structure, in particular, their tails. From any node, one can traverse to ancestors of the node, but not to any other node.

See also