Selamat Datang Di Blog Kami Semoga Bermanfaat


Tuesday, January 26, 2010

Tree In Data Structure

In Data Structures, Tree is one of the data structure
shaped like a tree, which consists of attack
series node (node) of each node is berhubungan.Node-in
vektor.Setiap connect by a node can have 0 or
more child nodes (child). A node that has a child node in -
call the parent node (parent). A child node has only one
parent node. By convention computer science, Tree growing
down, not like in the real world tree that grows up.
Thus the child node will be described under the node
induknya.Node in the base of the tree is called the root node (the root),
while the node is located at the tip of tree pyramid is called
leaf node (leaf).

Binary Tree (Binary Tree)
In the course of data structures, will be specifically studied
finger on the binary tree. Binary tree is a tree that
each knot can only have a maximum of 2 (two)
No child node lebih.Pada binary tree, generally two
child node is called the position, the left and right.
Some terms in the binary tree:
- Size (size): the total number of existing nodes in binary tree.
- Depth (depth): the long path that connects a
node to node until the very end of her child (leaf).
Depth is often called height.Full Binary Tree (Full Binary Tree)
is a binary tree each nodenya has 0 or 2 child nodes.

Perfect Binary Tree
(Binary Tree Perfect) is a binary tree of all nodes leafnya
is at a depth of samadari root node. Also called
as a Complete Binary Tree (Complete Binary Tree)

Almost Complete Binary Tree
(Almost Complete Binary Tree) is a binary tree of each
0 node nodenyadapat have children, or have left, or if
has a right to have kiri.Tidak should have the right course.
Implementation of programming, in this subject will be in
discussed for binary trees only. Initial assumption is that the data
to be inserted in the node, an integer data type.

No comments:

lwk

Related Posts Plugin for WordPress, Blogger...