Question: Instructions Provide implementation for a Binary Search Tree. This should include a TreeNode class, which includes data ( which will be an int ) ,
Instructions
Provide implementation for a Binary Search Tree. This should include a TreeNode
class, which includes data which will be an int and left and right subnodes.
You must also implement a BinarySearchTree class, which includes the following:
An Insert method, which accepts an int and places it inside the tree in order, as
discussed in class
A Search method, accepts an int, and returns a bool indicating whether or not
the value was found
A Delete method, which accepts an int as parameter, and if it exists in the tree
removes it
Three traversal methods, one for each of the traversal orders inorder, pre
order, postorder
Your tree should also include a root, which is the root of the tree
C# please!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
