From a652d51791fa0eeeb900bff776dec1bd5dc51d73 Mon Sep 17 00:00:00 2001 From: Shubham Sah <42349247+shubhamsah@users.noreply.github.com> Date: Tue, 26 May 2020 21:06:32 +0530 Subject: [PATCH] Update AscendingPriorityQueue.c Added the output of the file --- .../linked_list/ascendingPriorityQueue.c | 113 ++++++++++++++++-- 1 file changed, 102 insertions(+), 11 deletions(-) diff --git a/data_structures/linked_list/ascendingPriorityQueue.c b/data_structures/linked_list/ascendingPriorityQueue.c index 0088262d..e55b7e8f 100644 --- a/data_structures/linked_list/ascendingPriorityQueue.c +++ b/data_structures/linked_list/ascendingPriorityQueue.c @@ -1,15 +1,4 @@ /* Ascending priority queue using Linked List - Program to implement Ascending priority queue using Linked List */ -/** Input State of Queue - 1 - 2 2 - 1 - 3 2->3 - 2 3 - 3 - - Output - 2 -**/ #include #include @@ -178,3 +167,105 @@ int main() return 0; } +/* Output of the Program*/ + +/* + Menu: +1:Insert +2:Remove +3:exit +Enter your choice: 1 +Enter element to be inserted: 12 +Queue from front to rear is as shown: +12 + + + Menu: +1:Insert +2:Remove +3:exit +Enter your choice: 1 +Enter element to be inserted: 1 +Queue from front to rear is as shown: +12 1 + + + Menu: +1:Insert +2:Remove +3:exit +Enter your choice: 1 +Enter element to be inserted: 14 +Queue from front to rear is as shown: +12 1 14 + + + Menu: +1:Insert +2:Remove +3:exit +Enter your choice: 1 +Enter element to be inserted: 3 +Queue from front to rear is as shown: +12 1 14 3 + + + Menu: +1:Insert +2:Remove +3:exit +Enter your choice: 1 +Enter element to be inserted: 5 +Queue from front to rear is as shown: +12 1 14 3 5 + + + Menu: +1:Insert +2:Remove +3:exit +Enter your choice: 2 +Element removed is: 1 +Queue from front to rear is as shown: +12 14 3 5 + + + Menu: +1:Insert +2:Remove +3:exit +Enter your choice: 2 +Element removed is: 3 +Queue from front to rear is as shown: +12 14 5 + + + Menu: +1:Insert +2:Remove +3:exit +Enter your choice: 2 +Element removed is: 5 +Queue from front to rear is as shown: +12 14 + + + Menu: +1:Insert +2:Remove +3:exit +Enter your choice: 2 +Element removed is: 12 +Queue from front to rear is as shown: +14 + + + Menu: +1:Insert +2:Remove +3:exit +Enter your choice: 2 +Element removed is: 14 +Queue empty. No data to display + +*/