Trivial C, C++ Programs.

Tag Archives: Queue

Queues Using Linked Lists in C++

And NO, there is no meaning to adding a special operation called ‘Create’ the queue. When you push in the first element, the queue is created. Of course I didn’t bother to check for exceptions. This is a straight off the text book program, suck on it bitches.   #include<iostream.h> #include<conio.h>   struct node { [...]

Queues Using Arrays (Static) in C++

It does what it says. A first-in first-out structure, implement in the simplest possible way. Again, no bound checks. Sanitize your inputs please. #include <iostream.h>   int *Queue, front, rear, maxSize;   void createQueue(); void push(); void pop(); void dispQueue();   int main() { int choice; while(choice != 5) { cout<<"\n\n Enter your choice :" [...]