Binary Search Trees
This project is a programming assignment in C which aims at developing an algorithm that builds a binary search tree (BST) from a given sequence and attemps to find other sequences that yield the same BST topology.
Example:
- a) Take an input sequence from user:
For instance; let us assume that user will enter the following input sequence:
18 12 8 4 2 16 14 15 17 36 24 20 21 72 54
- Build BST topology:
Be careful that input sequence will be entered by the user and may be of arbitrary length.
- Find how many different sequences yield the same BST topology and list these sequences. Please note these sequences need be composed of exactly as many keys as those in the input sequence.
The main goal of this project is to be familiar with search trees. So, use of arrays/linked lists instead of trees is not acceptable.
In this project you are expected to develop an algorithm that is capable of finding a solution to the above problem and implement this algorithm in ANSI C that runs under either UNIX or Windows.
Reviews
There are no reviews yet.