most of the code is written already, there are two parts that need to be completed in one file, shouldnt take long at all, no more than a hr or 2. . .will give u link for code and assignment. . thanks:
I have already written most of a program that does the following. The program takes commands from users, as usual; the following commands are supported:
&acirc;&acirc;‚&not;&Acirc;¢exit: quits the program
&acirc;&acirc;‚&not;&Acirc;¢newtree: asks the user to enter an inorder sequence and a preorder sequence (of strings) of a tree. As we have discussed in class, these two orders are sufficient to reconstruct the tree. Once the user has entered the two sequences, the tree is the "current tree", and the old tree (from a previous typing of newtree command) is discarded.
&acirc;&acirc;‚&not;&Acirc;¢preorder: prints the current tree in preorder
&acirc;&acirc;‚&not;&Acirc;¢inorder: prints the current tree in inorder
&acirc;&acirc;‚&not;&Acirc;¢postorder: prints the current tree in postorder
&acirc;&acirc;‚&not;&Acirc;¢levelorder: prints the current tree in levelorder
&acirc;&acirc;‚&not;&Acirc;¢ver: prints the current tree vertically in a "pretty format", for example, if the tree is
In this directory, you will find the source codes for the above program. All commands are already implemented except for ver and hor. Your job is to implement the two functions in print.cpp. That is the only file you can modify. Please keep the content of the rest intact and do not add any more file to the source directory. ver is much easier, so please implement that first. Currently, you can type make to compile the program and all commands will work. For ver and hor, a line TBD will be printed.
need the two parts written in [url removed, login to view] and only [url removed, login to view] to be modified.
[url removed, login to view]~hungngo/classes/2012/Spring/250/assignments/a4/
let me know ASAP if you can do it in a day. . thanks