Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

B)(5 points) Consider th S stands for exponers 2(20 points)A)(10 points)-Trace(Draw data structure that you obtained) and list y the the o of the following

image text in transcribed

B)(5 points) Consider th S stands for exponers 2(20 points)A)(10 points)-Trace(Draw data structure that you obtained) and list y the the o of the following program. struct nodetype { struct nodetype "left; int info; struct nodetype *right; }; typedef struct nodetype NODE; typedef NODE "NODEPTR; void main() ( NODEPTR root, p, q; root NULL; int sevenNum[7]=(45,75, 60, 30, 15, 36, 80}; int number, i-0; number=sevenNum[i]; root maketree(number); /* insert first root item*/Draw Data structure(5 points) do{ number=sevenNum[++i]; p=q=root; /* find insertion point */ while(ql-NULL) (p=q; ir (number info) q = p->left; else q = p->right; q=maketree(number); /* insertion */ if (numberinfo) p->left=q; **** Output (5 points) **** else p->right=q; }while(i!=6); printf("X Traversing "); xtrav(root); void xtrav(NODEPTR tree) { if (tree != NULL) { xtrav(tree->left); xtrav(tree->right); printf("%d ", tree->info); NODEPTR makeiree(int a) { NODEPTR p; p=(NODEPTR) malloc(sizeof(struct nodetype)); p->info=x; p->left=NULL;p->right=NULL; return(p); Draw t

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Development Of Knowledge Framework For Affective Content Analysis

Authors: Swarnangini Sinha

1st Edition

B0CQJ13WZ1, 979-8223977490

More Books

Students also viewed these Databases questions