出典:Wikipedia
出典:『Wikipedia』 (2011/03/12 18:23 UTC 版)
A spaghetti stack (also called a cactus stack or saguaro stack) in computer science is an N-ary tree data structure in which child nodes have pointers to the parent nodes (but not vice-versa). When a list of nodes is traversed from a leaf node to the root node by chasing these parent pointers, the structure looks like a linked list stack. It can be analogized to a linked list having one and only parent pointer called "next" or "link", and ignoring that each parent may have other children (which are not accessible anyway since there are no downward pointers).