Starting from:

$30

CSCI203-Lab 3 Binary Search Tree Solved

•   To practice solving problems using binary search tree (BST)

•   To be able to do traversing a tree

•   To practice writing solutions to problems in a clear and succinct way

 

Problem
You are to implement BST and test it for correctness. Your program will prompt for the name of an input file and the read and process the data contained in this file. 

 

The file contains a sequence of integer values. Read them and construct a binary search tree from  the values in the order they are read. Thus the first number read will be the root of the tree. 

 

You may use dynamic data but you should attempt to store the numbers in an array. 

 

You do not need to balance the tree as you construct it. 

 

When you have read the last value into the BST, conduct an in‐order traversal to output the values in ascending order

More products