Attached is the input file the commands should be executed


My goal is to develop some binary tree routines in C++ that will handle single word data. The binary tree will be maintained as an ordered tree.

The routines I need are:

Add - add a new word to tree (do not allow duplicates).

Search - look up a word in the tree and indicate if the word is in the structure or not.

Traverse (in-order, pre-order, post-order) - label tree output with traversal order used to print the tree.

Attached is the input file. The commands should be executed in the order given. Where it says an order type such as inorder, that means to print the tree so far, in that way.

I have code for a lot of this but it needs checking. I do not have much experience with string functions, so try to use them as less as possible.add kindness
add rascal
add structures
add man
add forest
add mice
add manoman
add until
add rascals
add yahoo
add jack
add jammers
add kindman
add help
add freedom
add rock
add ill
add hope
add free
add boy
add rocknroll
add kelvin
add jimbo
add bubba
add rockback
add kindhearted
add mankind
add rooster
add manup
add kinny
inorder
preorder
search kindness
search kindman
search kin
search rocknroll
search rascal
search rascals
search mankind
add kindness
add kindwoman
add kinny

add rockey

add mom

Attachment:- main.zip

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Attached is the input file the commands should be executed
Reference No:- TGS01245939

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)