Home
Introduction
Properties
Operations
References
Quiz
|
CS 331
Data Structures and Algorithms
Binary Search Trees
Introduction
Tree:
A tree is defined as a nonempty finite set of labeled nodes
such that there is only one node called the root of the tree,
and the remaining nodes are partitioned into subtrees.
Some Terminologies:
Root:
Root of the tree is the top most node.
Leaves:
Leaf is at the bottom most node.
Child:
Child nodes are underneth the parent.
Parents:
Parents are nodes that have children.
Sibling:
Sibling are children with same parent.
Binary Search Tree:
Binary search tree is an binary tree in which each internal node 'x' stores
an element such that the element stores in left subtree of 'x' less than x and
elements stores in right subtree stores elements greater than or equal to 'x'
Balanced Binary Search Tree:
The path lengths from the root node to each of the leaf nodes are roughly the same.
Binary Search Tree majar advantage:
The major advantage of binary search trees over other data structures is that the
related sorting algorithms and search algorithms such as in-order traversal can be
very efficient.
Binary Search Tree applications:
1.Handy for rapid searching in coputer programs.
2.Organizing large files.
Previous|
Home|
Next
|