Queue Using Linkedlist
Queue Using Linkedlist
Queue Using Linkedlist
do {
cout << "\nQueue Menu:\n";
cout << "1. Enqueue (Insert)\n";
cout << "2. Dequeue (Remove)\n";
cout << "3. Display Queue\n";
cout << "0. Exit\n";
cout << "Enter your choice: ";
cin >> choice;
switch (choice) {
case 1:
cout << "Enter the value to enqueue: ";
cin >> value;
enqueue(value);
break;
case 2:
dequeue();
break;
case 3:
display();
break;
case 0:
cout << "Exiting the program.\n";
break;
default:
cout << "Invalid choice! Try again.\n";
}
} while (choice != 0);
return 0;
}