| 40 | } |
| 41 | } |
| 42 | void dequeue() |
| 43 | { |
| 44 | if(front==-1) |
| 45 | printf("\n UnderFlow!!\n"); |
| 46 | |
| 47 | else |
| 48 | { |
| 49 | printf("\n Element: %d with Priority: %d is deleted \n",pq[front].val,pq[front].priority); |
| 50 | if(front==rear) |
| 51 | front=rear=-1; |
| 52 | else |
| 53 | front++; |
| 54 | } |
| 55 | |
| 56 | } |
| 57 | |
| 58 | void display() |
| 59 | { |