Binary tree routines in c++ that will handle single word

Assignment Help C/C++ Programming
Reference no: EM13936618

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

Reference no: EM13936618

Questions Cloud

Discuss the relevant international laws and policies : Identify a data breach case which was international and discuss the relevant international laws and policies used to address and prosecute those responsible for the breach
Program that prints out any size triangle based on 2 inputs : My goal is to write a program that prints out any size triangle based on either one or two inputs (would prefer 2; e.g. range[a, e]). Each line of the triangle will be centered and looks like the attached output (equilateral triangle).
Describe what physical, logical and port addresses : With respect to TCP/IP; a) Describe what physical, logical and port addresses are and why they are required. b) Provide a real example of a physical, logical and port address - this should be from your own computer on your own network, or a lab co..
What is difference between primary and secondary succession : Describe one positive effect that recycling has on the environment. Describe one human activity hat is thought to be a major contributor to global warming and explain how it may contribute to the problem.
Binary tree routines in c++ that will handle single word : 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.
Does the animal have any natural enemies : Explain how the animal is able to defend itself. (How does the animal use its habitat to defend and protect itself and its family?) What special features or behaviors does the animal have to escape from its predator?)
How your journal entry on the settlement date would change : Prepare dated journal entries for Fleming to reflect above transactions using the net method. Do not use hedge accounting. Explain how your journal entry on the settlement date would change if the receivable was hedged.
Discuss our excessive consumption of energy : Discuss why energy is not recycled in an environment and why an ecosystem can only support a finite population of species. Discuss our excessive consumption of energy and its implications upon future generations.
What are overloaded methods : Overloaded methods for the operations of adding, subtracting, multiplication, and division will need to be created requiring one or two arguments. The single argument is added to, subtracted from, divided over, or multiplied by the running answer...

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Organize a lot of data under a single structure

Arrays make it possible to organize a lot of data under a single structure. For example, an application that tracks daily sales revenue at a retail store could use the month and day of the month as indexes to the array to store and to retrieve sales ..

  Write a program that convert fahrenheit to degrees celsius

Write a program that will convert Degrees Fahrenheit to Degrees Celsius.

  Dynamicword.h contains a class definition

Consider the following main function.  Assume that DynamicWord.h contains a class definition for a class called DynamicWord that holds a pointer to a dynamic array as a private data member, but the assignment operator (=) has not been overloaded for ..

  Write a program that will read in 2 test score.

Write a program that will read in 2 test score. The instructor has decided to give each student 10 bonus point on each test. Print out each test score and the total after the bonus, the print the total number of points earned on the tests.

  Write a statement that writes both of their values

Write a statement that writes both of their values to standard output in the format

  Determines how many breaths a person has had in their life

Develop and test a program that determines how many breaths and how many heartbeats a person has had in their life. The average respiration (breath) rate of people varies with age.

  Create a function that will accept a scalar value

Create a function that will accept a scalar value for the radius of the cylinder and end caps and will accept an array for the height of the cylinder.

  Construct an er diagram

Finally, the company is required by its insurers to maintain a record of the position of each vessel; its port and date of departure, destination and estimated date of arrival; number of officers, total number on board, and total value of cargo ca..

  The size ofthe character array holding your filename

How to express for code "THE SIZE OF THE CHARACTER ARRAY HOLDING YOUR FILENAME >=1024 (or use strings), we need to use long file names when grading your code."

  Public transport fare ticketing system

Implement and test a public transport fare ticketing system.

  Basic game of battleship

Basic Game of Battleship - Analyze a basic set of requirements and apply top-down design principles for a problem and eliminate redundancy within a program by applying loops and functions

  The funtion should take as parameters

Write a function in c ++ that multiplies two functions. the funtion should take as parameters two fraction structures. Then, the function should multiply the two fractions and return the solution as a fraction structure.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd