priority queue with linked list
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: PQLLMain_Mahato.c * Author: Aaditya * * Created on April 8, 2020, 9:45 PM */ #include <stdio.h> #include <stdlib.h> #include "PQLL_Mahato.h" int main(int argc, char** argv) { //create a new priority queue Node* pq = newNode('B' , 1); enqueue(&pq, 'C' , 2); enqueue(&pq, 'D' , 3); enqueue(&pq, 'A' , 0); while (!isEmpty(&pq)) { printf("%c ", peek(&pq)); dequeue(&pq); } printf("\n"); return (EXIT_SUCCESS); }