TheInfoListRev V5.1.84
Xfr/
SummaryRelatedTreeNews

Related topics

Tree traversal

Sponsored
Shop Amazon for air fryers
Browse products on Amazon.
Search Amazon →
As an Amazon Associate I earn from qualifying purchases.

In computer science, tree traversal (also known as tree search and walking the tree) is a form of graph traversal and refers to the process of visiting (e.g. retrieving, updating, or deleting) each node in a tree data structure exactly once. Such traversals are classified by the order in which the nodes are visited. The following algorithms are described for a binary tree, but they may be generalized to other trees as well.

Binary search treeBinary search treeIn computer science, a binary search tree (BST), also called an ordered or sorted binary tree, is a rootedbinary treedata structure with the key of each internal node being greater than all the keys in the respective node's left subtree and less than the ones in its right subtree. The time complexity of operations on the binary search tree is linear with respect to the height of the tree.Iterative deepening depth-first searchIn computer science, iterative deepening search or more specifically iterative deepening depth-first search (IDS or IDDFS) is a state space/graph search strategy in which a depth-limited version of depth-first search is run repeatedly with increasing depth limits until the goal is found. IDDFS is optimal, meaning that it finds the shallowest goal.Graph traversalGraph traversalIn computer science, graph traversal (also known as graph search) refers to the process of visiting (checking and/or updating) each vertex in a graph. Such traversals are classified by the order in which the vertices are visited. Tree traversal is a special case of graph traversal.Stack (abstract data type)Stack (abstract data type)In computer science, a stack is an abstract data type that serves as a collection of elements with two main operations: Push, which adds an element to the collection, andPop, which removes the most recently added element.Additionally, a peek operation can, without modifying the stack, return the value of the last element added (the item at the top of the stack). The name stack is an analogy to a set of physical items stacked one atop another, such as a stack of plates.Binary treeBinary treeIn computer science, a binary tree is a tree data structure in which each node has at most two children, referred to as the left child and the right child. That is, it is a k-ary tree where k = 2. A recursive definition using set theory is that a binary tree is a triple(L, S, R), where L and R are binary trees or the empty set and S is a singleton (a single–element set) containing the root. From a graph theory perspective, binary trees as defined here are arborescences.List of data structuresThis is a list of well-known data structures. For a comparison of running times for a subset of this list see comparison of data structures. Data typesPrimitive typesBoolean, true or false.CharacterFloating-point representation of a finite subset of the rationals.Call stackCall stackIn computer science, a call stack is a stackdata structure that stores information about the active subroutines and inline blocks of a computer program. This type of stack is also known as an execution stack, program stack, control stack, run-time stack, or machine stack, and is often shortened to simply the "stack".Linked listIn computer science, a linked list is a linear collection of data elements whose order is not given by their physical placement in memory. Instead, each element points to the next. It is a data structure consisting of a collection of nodes which together represent a sequence. In its most basic form, each node contains data, and a reference (in other words, a link) to the next node in the sequence.Reverse Polish notationReverse Polish notationReverse Polish notation (RPN), also known as reverse Łukasiewicz notation, Polish postfix notation or simply postfix notation, is a mathematical notation in which operators follow their operands, in contrast to the more common infix notation (in which operators are placed between operands), as well as prefix notation (in which operators precede their operands). The notation does not need any parentheses as long as each operator has a fixed number of operands.Computer scienceComputer scienceStudy of computationFundamental areas of computer scienceProgramming language theoryComputer architectureArtificial intelligenceComputational complexity theoryComputer science is the study of computation, information, and automation, together with their associated phenomena.Array (data structure)Array (data structure)In computer science, an array is a data structure consisting of a collection of elements (values or variables), of the same memory size, each identified by at least one array index or key, the collection of which may be a tuple, known as an index tuple. In general, an array is a mutable and linear collection of elements with the same data type.Tree (abstract data type)Tree (abstract data type)In computer science, a tree is a widely used abstract data type that represents a hierarchical tree structure with a set of connected nodes. Each node in the tree can be connected to many children (depending on the type of tree), but must be connected to exactly one parent, except for the root node, which has no parent (i.e., the root node as the top-most node in the tree hierarchy).

*As an Amazon Associate I earn from qualifying purchases.

AboutPrivacyContact

TheInfoList organizes topic information and links to original sources.

Loading topic…