Question: I need to revise the code to pass multiple tests. One test is: expected output: Test 5 : 1 papa 1 quebec 1 alpha 1
I need to revise the code to pass multiple tests. One test is: expected output: Test: papa quebec alpha hotel india juliet kilo bravo alpha lima charlie alpha india delta epsilon mike nov oscar foxtrot golf alpha bravo oscar epsilon lima alpha hotel alpha
#include "BSTree.h
#include
using namespace std;
void BSTree::insertconst string& key
if root nullptr
root new Nodekey;
return;
forNode currroot; curr nullptr;
bool BSTree::searchconst string& key const
throw runtimeerrornot done search";
string BSTree::largest const
return ;
string BSTree::smallest const
return ;
int BSTree::heightconst string& key const
return heightofcurr;
void BSTree::removeconst string& key
removenullptrroot,key;
void BSTree::preOrder const
preOrderroot;
cout endl;
void BSTree::postOrder const
postOrderroot;
cout endl;
void BSTree::inOrder const
inOrderroot;
cout endl;
void BSTree::removeNode parent, Node tree, const string& key
throw runtimeerrornot done remove";
int BSTree::heightofNode tree const
throw runtimeerrornot done heightof;
void BSTree::preOrderNode tree const
throw runtimeerrornot done preOrder";
void BSTree::postOrderNode tree const
throw runtimeerrornot done postOrder";
void BSTree::inOrderNode tree const
throw runtimeerrornot done inOrder";
void BSTree::debugNode tree, int indent const
if tree nullptr return;
forint i;iindent;i cout ;
cout tree tree endl;
debugtreeleft,indent;
forint i;iindent;i cout ;
cout endl;
debugtreeright,indent;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
