DFS :: PRIORITY

#include<stdio.h>
#include<process.h>
struct node
{
struct node *llink;
int data;
int priority;
struct node *rlink;
};
void insert();
void remove();
void display();
void main()
{
int choice;
while(1)
{
printf(“Enter Your Choice:\n1.Insertion\n2.Deletion\n3.Display\n4.Exit\n”);
scanf(“%d”,&choice);
switch(choice)
{
case 1:
insert();
break;
case 2:
remove();
break;
case 3:
display();
break;
case 4:
abort();
default:
printf(“Invalid Choice\n”);
}
}
}
void insert()
{
int element,priority;
printf(“Enter the element and its priority:”);
scanf(“%d%d”,&element,&priority);
}
void remove()
{
}
void display()
{
}

Share

About the Author

Akash Padhiyar

Visit Website

There are no comments yet, add one below.

Leave a Comment

Your email address will not be published. Required fields are marked *

*

Time limit is exhausted. Please reload CAPTCHA.