Queue: Queue is a linear structure which follows a particular order in which the operations are performed. Operations on Queue: Mainly the following four basic operations are performed on queue: Enqueue: Adds an item to the queue. If the queue is full, then it is said to be an Overflow condition. Dequeue: Removes an item from the queue. The items are popped in the same order in which they are pushed. If the queue is empty, then it is said to be an Underflow condition. Front: Get the front item from queue. Rear: Get the last item from queue. Applications of Queue: Queue is used when things don’t have to be processed immediately, but have to be processed in First InFirst Out order like Breadth First Search. This property of Queue makes it also useful in following kind of scenarios. 1) When a resource is shared among multiple consumers. Examples include CPU scheduling, Disk Scheduling. ...
Binary Search Tree Operations //Main File #include<stdio.h> #include<stdlib.h> #include "tree.h" NODE * create(NODE *root); NODE * insert(NODE *root,int n); NODE *search(NODE * root, int n); void display(); void preorder(NODE * root); void inorder(NODE * root); void postorder(NODE * root); NODE * deletebst(NODE *root, int n); int Node_count(NODE *root); int Leaf_count(NODE *root); NODE *treecopy(NODE *root); int comparebst(NODE *root, NODE *root1); int sumOdd(NODE *node); int sumEven(NODE *node1); void mirror(NODE *root); int smallest(NODE * root); int largest(NODE * root); void main() { NODE *root=NULL, *root1=NULL; int n, num, osum, esum, choice; printf("\t\t>>Operations of Binary Search Tree<<\n\n"); printf("\t\t\t>>First Create BST<<\n"); //CREATE root = create(root); root1 = create(root1); do { printf("\n\n1.INSERT"); print...