Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CompE260: Programming Assignment on BST This program requires you to implement a Binary Search Tree with the following operations to be executed on the tree
CompE260: Programming Assignment on BST This program requires you to implement a Binary Search Tree with the following operations to be executed on the tree 1) Insert a node in the tree 2) Delete a node from the tree 3) Search for an element in the tree 4) Traverse the tree in Preorder, Inorder and Postorder fashion 5) Print the contents of the tree in preorder fashion The program shall comprise of the following files: TreeNode.h BST.h BST.cpp Driver.cpp The file TreeNode,h shall consist of the class TreeNode. This class shall have BST as its friend class. In addition, this file should also contain the description of the class constructor and accessor functions (thus we avoid creating a TreeNode.cpp) The outline of this file is as follows: Class TreeNode { Friend class BST; Public: TreeNode); //default constructor TreeNode(int i, TreeNode* L 0; TreeNode* R-0); //explicit value constructor int getltem 0 const; // accessor function
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started