# Building a Binary Search Tree

Building a Binary Search Tree

In this assignment you will be implementing a binary search tree. You must use a linked-list (i.e. reference-based) to implement the tree. Each node in your tree should hold a character. Each node will also contain an integer called count. Include the following functions/methods for the BST tree:

.

Insert Insert an item into the binary search tree. Be sure to keep the binary search tree properties. When an item is first inserted into the tree the count should be set to 1. When adding a duplicate character, rather than adding another node, the count variable should just be incremented. You should insert in a case-insensitive manner. In other words, the letter 'a' and the letter 'A' would be considered as the same letter.

Search Write a recursive function that searches for a character in the binary search tree. It should return a pointer to the node in which it is found or it should return NULL if the character is not in the tree. Again, this should be case-insensitive.

FindMin Find and return the smallest character (the one with the smallest ASCII value) in the tree.

FindMax Find and return the largest character (the one with the largest ASCII value) in the tree.

Height Compute and return the height of a particular subtree. This function should take a pointer to a node and return the height of the subtree using the specified node as the root. Thus, if the root was passed to this function, the value returned would be the height of the entire tree.

Remove Remove a node from the tree. Be sure to maintain all binary search tree properties. If removing a node with a count greater than 1, just decrement the count.

Print Print the tree in the following manners. When printing a node, print the character followed by the count in parentheses. For example, c(2), k(1).

Preorder Traverse and print the tree in preorder notation. Write this function recursively.

Inorder Traverse and print the tree in inorder notation. Write this function recursively.

Postorder Traverse and print the tree in postorder notation. Write this function recursively.

Your program should perform the following steps:

1. Prompt the user for the name of the file (a string). Use the string input by the user as an argument to open file:

2. Open the file on disk, and process its contents, adding characters to the BST and

increasing the counts of existing characters if necessary

3. Repeat steps 1&2 until the user enters some sentinel value.

4. Print the BST tree

5. Print the minimum character and maximum character in the BST.

6. Prompt the user for the character he wants to search and perform searching, print the result

7. Prompt the user for one character to be removed, and then print the BST tree after deletion.

Kemahiran: Java

Tentang Majikan:
( 49 ulasan ) Toronto, Canada

ID Projek: #14861142

\$50 CAD dalam sehari
(319 Ulasan)
6.4

## 17 pekerja bebas membida secara purata \$149 untuk pekerjaan ini

liangjongai

Hi! I'm interesting your project very well. I am mastering Java and I'm a good Mathematician. And also I have many knowledge and experience about BTree. Let's go ahead with me Stay tuned, I'm still working on this p Lagi

\$150 CAD dalam 3 hari
(70 Ulasan)
5.4
\$140 CAD dalam 3 hari
(29 Ulasan)
4.8
\$155 CAD dalam 3 hari
(6 Ulasan)
4.3
anhnh23

Hi, I have a bachelorâ€™s degree in Computer Science & I have 5+ years in Java; Solving problem and optimizing system are my passion. Satisfied customers is my key strategy. Relevant Skills and Experience Object-oriente Lagi

\$80 CAD dalam 3 hari
(20 Ulasan)
3.9
younjess

hi , i worked on pass about these kind of problems, i'm able to finished it on few time , but to don't be under much pressure i preferer 3 days or so , no problems we can talk about that if you want . Relevant Skills Lagi

\$66 CAD dalam 10 hari
(9 Ulasan)
3.4
BeshoyMousaKhair

. Relevant Skills and Experience . Proposed Milestones \$100 CAD - .

\$100 CAD dalam 3 hari
(13 Ulasan)
3.5
ShakaibArsalan7

Hey an experience java developer is here and got experience of two year and got good knowledge of java fundamental and OOP so feel free to contact me over chat to discuss further Regards Relevant Skills and Experience Lagi

\$200 CAD dalam 4 hari
(10 Ulasan)
3.1
alhassanlatif

Hello, I will build your BST in Java I have studied it and use this data structure many times. Relevant Skills and Experience I have experience in Java for more than 5 years and built many projects using it also I pa Lagi

\$133 CAD dalam 4 hari
(1 Ulasan)
0.5
\$155 CAD dalam 3 hari
(0 Ulasan)
0.0
\$333 CAD dalam sehari
(0 Ulasan)
0.0
\$155 CAD dalam 3 hari
(0 Ulasan)
0.0
\$200 CAD dalam 3 hari
(0 Ulasan)
0.0
dharmjitsingh

I have placed a bid on this project as I have already implemented many ADT of data structures in Java Relevant Skills and Experience Java/Data Structures and algorithms Proposed Milestones \$111 CAD - one time deliver Lagi

\$111 CAD dalam 3 hari
(0 Ulasan)
0.0
jomingeorge94

Hi, I am web developer experienced in designing and developing websites for my own projects as well as for clients. I have just graduated from Newcastle University studying Bsc Computer Science. I have seen your pos Lagi

\$220 CAD dalam sehari
(0 Ulasan)
0.0
\$133 CAD dalam 4 hari
(0 Ulasan)
0.0
CGuzmanP

I've worked with binary trees before, and had similar assignments, so I already have code to start with. My code is clean and easy to read, so you'll have no problems understanding it. Relevant Skills and Experience I Lagi

\$150 CAD dalam 3 hari
(0 Ulasan)
0.0