Exercise: write a C# program to create a Binary Search Tree. This Binary Search Tree is to store the integer values. Your program should display a menu of choices to operate the Binary Search Tree data structure. See the sample menu below:
=================================================
Binary Search Tree Operations Menu
==================================================
1. Add items
2. Delete items
3. Show min node
5. Show max node
6. Find a node
7.Print all nodes
7. Exit
Enter your choice:1
In a Binary Search Tree data structure that stores the integer values, there is
root node. The nodes that are less than the root node will be put in the left
side and the nodes that are greater than the root node will be put in the right
side. The nodes that are in the higher positions are called the parent nodes
and the nodes that are in the lower positions are called child nodes. The
parent nodes may have more than one child. It also may not have a child.
The node that doesn't have a child is called leaf.
Solution:
To keep this solution simple and easy to follow, we divide this solution in to different steps.
Step 1: Defining the binary search tree node
To implement the binary search tree in C#, Each node of the binary search tree should contain 4 componentsdata, left child link, right child link and parent link. The left child link points to the left child and the right child link points to the right child. The parent link will be used to store the parent node.
public class TreeNode{a a 20161207 

This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.