Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

using c # in visual studio In this assignment, you will develop and implement a Binary Search Tree (BST) data structure of your own design.

using c # in visual studio

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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions