Skip to main content

Posts

Showing posts with the label priority queue

Basic Priority queue in C

The source code of basic priority queue is given : #include<stdio.h> #include<malloc.h> void insert(); void del(); void display(); struct node     {         int priority;         int info;         struct node *next;     }*start, *q, *temp, *new; typedef struct node *N; int main() {     int ch;     do      {             printf( "\n[1] INSERTION\t[2] DELETION\t[3] DISPLAY [4] EXIT\t:" );             scanf( "%d", &ch );             switch ( ch )                 {               ...