Question
USING C# only! In this assignment, you will develop and implement a Binary Search Tree (BST) data structure of your own design. The BST must
USING C# only!
In this assignment, you will develop and implement a Binary Search Tree (BST) data structure of your own design. The BST must be able to hold any data type (it must be a generic/template class) and must implement the following functions/methods:
Add(element)
Find(element)
Preorder(node)
Inorder(node)
Postorder(node)
Size The add function/method must add the element to the BST, unless the value already exists.
The find function/method must return the BST Node that contains the element; otherwise null is returned.
The Preorder function/method performs a preorder traversal upon the BST starting at node.
The Inorder function/method performs an inorder traversal upon the BST starting at node.
The Postorder function/method performs a postorder traversal upon the BST starting at node.
The size method/function/property returns the size of the BST.
Write a program that demonstrates the use of each of the functions/methods listed above. Use the following string data to test your BST class: A, B, C, D, E, F, and G. Your projects must be in the following format: C#
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