The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 6 Days Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
This is a basic question about C++ programming. Please help me out, thanks!
(1)Â Write a C++ program which constructs the BST(binary search tree) for the following sequence of input string :
Â
data structure is one of the most important courses in computer science
Â
(eg: data<structure, courses<in, etc.)
(2)Â For the above BST, give the output of the inorder traversal.
Â
     Note that each node in a BST is defined as below :
Â
     template <class Item>
     class BST_node
{ public :
// typedef
typdef Item value_type;
…
private : Item key_field;
BST_node *left_son;
BST_node *right_son;
      }
Â
----------- He-----------llo----------- Si-----------r/M-----------ada-----------m -----------Tha-----------nk -----------you----------- fo-----------r y-----------our----------- in-----------ter-----------est----------- an-----------d b-----------uyi-----------ng -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------. P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll -----------be -----------qui-----------ckl-----------y