Answered step by step
Verified Expert Solution
Question
1 Approved Answer
/*Help with print function of c++ program can get Double threaded BST to properly allign*/ /*Cannot get program to correctly allign the Double Threaded BST,
/*Help with print function of c++ program can get Double threaded BST to properly allign*/
/*Cannot get program to correctly allign the Double Threaded BST, what is wrong? */
template
void BST
{
BSTNode
for (;;)
{
cout
p = tmp;
tmp = tmp->rc;
if (!p->rcThread)
{
while (!tmp->lcThread)
{
tmp = tmp->lc;
cout
}
cout
}
if (tmp == root)
break;
cout key()
}
}
/*Currently my output looks like so...*/
/*I need it to look like this...*/
67 68 69 78 75 79 83 85 87 90 Press any key to continue 67 68 69 78 75 79 83 85 87 90 Press any key to continueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started