Binary search tree (bst), Data Structure & Algorithms

Q. Explain what do we understand by Binary Search Tree (BST)? Make a BST for the following given sequence of the numbers.

45, 32, 90, 21, 78, 65, 87, 132, 90, 96, 41, 74, 92                                 


Binary search tree is explained below.

A binary search tree is a binary tree which is either empty or in which each node has a key that satisfies the below written conditions : -

All keys (if there are any) in the left sub tree of the root head the key in the root.

The key in the root heads all keys (if there are any) in its right sub tree.

The left and right sub trees of the root are again the search trees. The  tree for the following list of numbers is drawn below

45      32   90   21   78   65   87   132  90  96   41   74 92

375_search tree.png

Posted Date: 7/13/2012 2:52:31 AM | Location : United States

Related Discussions:- Binary search tree (bst), Assignment Help, Ask Question on Binary search tree (bst), Get Answer, Expert's Help, Binary search tree (bst) Discussions

Write discussion on Binary search tree (bst)
Your posts are moderated
Related Questions
Q. Explain the insertion sort with a proper algorithm. What is the complication of insertion sort in the worst case?

B- Tree  A B-tree of order m is an m-way true in which  1)  All leaves are on the similar level 2)  All internal nodes except the root have at most m-1(non-empty) childre

This is a unit of which targeted on the emerging data structures. Red- Black trees, Splay trees, AA-trees & Treaps are introduced. The learner must explore the possibilities of app

A depth-first traversal of a tree visits a nodefirst and then recursively visits the subtrees of that node. Similarly, depth-first traversal of a graph visits a vertex and then rec

Indexed Sequential Files An index is inserted to the sequential file to provide random access. An overflow area required to be maintained to permit insertion in sequence. I

What is tha flow chart of algorithm

What are the properties of an algorithsm?

a. Explain the sum of subset problem. Apply backtracking to solve the following instance of sum of subset problem: w= (3, 4, 5, 6} and d = 13. Briefly define the method using a sta

Objectives The purpose of this project is to give you significant exposure to Binary Search Trees (BST), tree traversals, and recursive code. Background An arbitrary BST i

To delete an element in the list at the end, we can delete it without any difficult. But, assume if we desire to delete the element at the straining or middle of the list, then, we