0% found this document useful (0 votes)
24 views

Tree Data Structure Children

The document defines key terms used to describe trees and binary trees. It explains that a tree contains nodes connected by edges, with one root node at the top. Nodes can be internal nodes with children or leaf nodes without children. Binary trees restrict nodes to having zero, one, or two children. Specific types of binary trees defined include full, proper, perfect, and complete binary trees, depending on whether internal nodes have exactly two children and whether all leaf nodes are at the same depth.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Tree Data Structure Children

The document defines key terms used to describe trees and binary trees. It explains that a tree contains nodes connected by edges, with one root node at the top. Nodes can be internal nodes with children or leaf nodes without children. Binary trees restrict nodes to having zero, one, or two children. Specific types of binary trees defined include full, proper, perfect, and complete binary trees, depending on whether internal nodes have exactly two children and whether all leaf nodes are at the same depth.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Root - the top most node in a tree.

Parent - the converse notion of child.

Siblings - nodes with the same parent.

Descendant - a node reachable by repeated proceeding from parent to child.

External node or Leaf - a node with no children.

Internal node - a node with at least one child.

Degree - number of sub trees of a node.

Edge - connection between one node to another.

Path - a sequence of nodes and edges connecting a node with a descendant.

Level - The level of a node is defined by 1 + the number of connections between the node and the root.

Height - The height of a node is the length of the longest downward path between the root and a leaf.

Forest - A forest is a set of n 0 disjoint trees.

A binary tree is a tree data structure in which each node has at most two children, which are referred to as
the left child and the right child.

A rooted binary tree is a tree with a root node in which every node has at most two children.

A full binary tree (sometimes 2-tree or strictly binary tree) is a tree in which every node other than the
leaves has two children. A full tree is sometimes ambiguously defined as a perfect tree. Physicists define
a binary tree to mean a full binary tree.

A proper binary tree is an ordered tree in which each internal node has exactly two children.

A perfect binary tree is a full binary tree in which all leaves have the same depth or same level, and in
which every parent has two children.[18] (This is ambiguously also called a complete binary tree (see next).)
An example of a perfect binary tree is the ancestry chart of a person to a given depth, as each person has
exactly two biological parents (one mother and one father); note that this reverses the usual parent/child
tree convention, and these trees go in the opposite direction from usual (root at bottom).

A complete binary tree is a binary tree in which every level, except possibly the last, is completely
filled, and all nodes are as far left as possible.[19] A tree is called an almost complete binary tree or nearly

complete binary tree if the exception holds, i.e. the last level is not completely filled. This type of tree is used
as a specialized data structure called a heap.

You might also like