Question 3: (Trees) 9. Traverse the given tree using Inorder, Preorder and Postorder traversals. 10. Show how to remove the node with the value 40 from the following binary search tree. Draw the...


solve


Question 3: (Trees)<br>9. Traverse the given tree using Inorder, Preorder and Postorder traversals.<br>10. Show how to remove the node with the value 40 from the following binary search tree. Draw the<br>resulting tree.<br>85<br>11. Draw the binary search tree that would result from the insertion of the following integer keys:<br>14 58 18 10 99 52 33 69 74 17.<br>12. Generate parse trees for the following expressions.<br>I.<br>(A + B) * (D/E)<br>(A +B^D)/(D-F)+ G<br>A* (B+ D)/ E- F * (G + H/ K)<br>II.<br>II.<br>13. Represent all the trees shown in questions 9 and 10 by using arrays.<br>

Extracted text: Question 3: (Trees) 9. Traverse the given tree using Inorder, Preorder and Postorder traversals. 10. Show how to remove the node with the value 40 from the following binary search tree. Draw the resulting tree. 85 11. Draw the binary search tree that would result from the insertion of the following integer keys: 14 58 18 10 99 52 33 69 74 17. 12. Generate parse trees for the following expressions. I. (A + B) * (D/E) (A +B^D)/(D-F)+ G A* (B+ D)/ E- F * (G + H/ K) II. II. 13. Represent all the trees shown in questions 9 and 10 by using arrays.
8. What is the result of the following program execution with the data and operations given<br>in main( ).<br>void pop)<br>{ int item;<br>if(Top == -1)<br>{ cout<<
using namespace std; #define MAXSIZE 10 void push(int); void pop(); void traverse(); int stack[MAXSIZE]; int Top=-1; int main() { int x; рop(); push(5); push(10); push(20); push(30); push(40);push(55); traverse(); pop(); pop();pop); traverse(); x=7; push(x); push(x*2); push(3+x);traverse(); х-2*(х-1); push(x); push(x*2); push(3+x);traverse(); push(100);traverse(); push(101); return 0; else { item = stack[Top]; Тор - Тор-1; } void traverse() int i; if(Top == -1) { cout<"the stack="" is=""><=top;i++) {=""><><" ";="" void="" push(int="" item)=""><"the stack="" is="">
Extracted text: 8. What is the result of the following program execution with the data and operations given in main( ). void pop) { int item; if(Top == -1) { cout<"the stack="" is=""> using namespace std; #define MAXSIZE 10 void push(int); void pop(); void traverse(); int stack[MAXSIZE]; int Top=-1; int main() { int x; рop(); push(5); push(10); push(20); push(30); push(40);push(55); traverse(); pop(); pop();pop); traverse(); x=7; push(x); push(x*2); push(3+x);traverse(); х-2*(х-1); push(x); push(x*2); push(3+x);traverse(); push(100);traverse(); push(101); return 0; else { item = stack[Top]; Тор - Тор-1; } void traverse() int i; if(Top == -1) { cout<"the stack="" is=""><=top;i++) {=""><><" ";="" void="" push(int="" item)=""><"the stack="" is="">
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here