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                                 

Ans.

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 Hash Tables, Hash function and Hashing Techniques properly?             A n s . H as h Table is explained as follows : A hash table is a data struc

The number of different directed trees with 3 nodes are ?? The number of disimilar directed trees with three nodes are 3

Assume you are in the insurance business. Find two examples of Type 2 slowly changing dimensions in that business. As an analyst on the project, write the specifications for applyi

Q. Write down an algorithm to sort a given list by making use of Quick sort method. Describe the behaviour of Quick sort when input given to us is already sorted.

A binary tree is a tree data structures in which each node have at most two child nodes, generally distinguished as "right" and "left". Nodes with children are called parent nodes,

A Sort which relatively passes by a list to exchange the first element with any element less than it and then repeats with a new first element is called as      Quick sort.


By taking an appropriate example explain how a general tree can be represented as a Binary Tree.                                                                    C onversio

Write a function that performs integer division. The function should take the large number in memory location 1 and divide it by the large number in memory location 2 disregarding

give any example of page replacement using fifo and use your own reference string