subject

In this assignment, you have to read a text file (in. txt) that contains a set of words. the first line of the file contains 3 numbers (n, s, d). these numbers represent the sequence of input words in your file. n: represents the number of words to read to build a binary search tree. you have to write a recursive insert code to create and insert these words into the binary search tree. after inserting all the items, you should show the words in pre-order in order, and post order. so, you need to create three functions for this purpose. s: represents the number of words to search from the tree. these s-words are placed after the first n words in the input file. you need to implement a search function that will be able to search these words in your bst. additionally, the search words will also be used to look in the binary search tree and count number of words in the tree that come before the search word, alphabetically. you will need to create a recursive function with the following prototype countbefore(treenode* root, char searchkey[]), where treenode is the node structure of your tree. d: represents the number of words to delete from the bst. this list of words are placed after n+words in the input file. write a recursive delete function for your task. after deleting all the items, also show the tree in three different orders of traversals.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:50
A911 dispatcher is the sole sender of messages to all police officers. while on patrol, officers communicate with the dispatcher who, in turn, relays messages to other officers. the officers do not communicate directly with one another. this illustrates a network.
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
Avariable definition defines the name of a variable that will be used in a program, as well as
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
You are new to microsoft certification and want to start out by getting a certification geared around windows 8. what microsoft certification should you pursue?
Answers: 1
You know the right answer?
In this assignment, you have to read a text file (in. txt) that contains a set of words. the first l...
Questions
question
Mathematics, 20.07.2019 23:30
Questions on the website: 13722361