🖨️ Printer Job Queue - Queue using Linked List

Visualize how print jobs are processed in FIFO order!

🎯 Problem: Printer Queue

Hi! I'm Teju 👋 We're building a printer queue system.

Print jobs arrive and are processed in First-In-First-Out (FIFO) order.

Operations:
ENQUEUE x → Add new print job x to the queue
DEQUEUE → Process (remove) the next job
FRONT → See the next job to be printed
ISEMPTY → Check if no jobs are pending

On empty queue: DEQUEUE and FRONT should print "Queue Empty"

⚙️ Queue using Linked List

We use a singly linked list with front (head) and rear (tail) pointers.

New jobs are added at the rear (ENQUEUE), and processed from the front (DEQUEUE).

  • ENQUEUE x: Create new node → add to rear → update rear
  • DEQUEUE: Remove front node, return its value (or "Queue Empty")
  • FRONT: Return front value (or "Queue Empty")
  • ISEMPTY: Check if front is null

🎮 Interactive Demo

📜 Operation Log

Enter commands and click Run Simulation...

📤 Output (as in problem)

Program output will appear here...

🖨️ Printer Queue (Linked List)

Empty Queue — No Jobs Pending