Innovation University · Group 24 · Data Structures Project (2026/2027)

Welcome To Our Presentation

Clinic Queue Management System

Dynamic FIFO Patient Scheduling in C++ Using Singly Linked Lists

O(1) Enqueue & Dequeue
0 STL Pure C++ Pointers
FIFO Fair Patient Triage
Faculty of Computers & Information Technology · Use ← → keys or scroll to navigate
02 · GROUP 24 ROSTER

WELCOME TO OUR TEAM

Innovation University · Group 24 · 5 Members

Team Leader
Bavly Bottrous Ragheb — Team Leader

Bavly Bottrous Ragheb

ID: 25030178 Group 24
Team Member
Marwan Yasser Metwally — Team Member

Marwan Yasser Metwally

ID: 25030215 Group 24
Team Member
Ziad Lotfy Abdelraziq — Team Member

Ziad Lotfy Abdelraziq

ID: 25030489 Group 24
Team Member
Yousef Ahmed Yousef — Team Member

Yousef Ahmed Yousef

ID: 24030148 Group 24
Team Member
Mohamed Emad Mohamed — Team Member

Mohamed Emad Mohamed

ID: 25030338 Group 24
03 · PROBLEM STATEMENT

Manual Queues and Fixed Arrays Create Bottlenecks

Clinic bottleneck analysis · Static data structures limit operational scalability

01

Unfair Service Order

Manual clipboard tracking leads to inconsistent prioritization, lost patient sequence, and dispute at triage.

Risk: Sequence Integrity Loss
02

Memory Inefficiency

Static arrays reserve pre-allocated memory pools upfront, idling unused space during quiet clinic shifts.

Risk: Wasted Contiguous RAM
03

Hard Overflow Boundaries

Fixed boundaries cause fatal overflow errors when unexpected emergency arrivals exceed preset buffer capacity.

Risk: Capacity Ceiling Failure
04 · ARCHITECTURE SOLUTION

A Dynamic FIFO Queue Organizes Patient Flow

A custom C++ console application replaces guesswork with a singly linked list structure operating under strict First-In, First-Out discipline.

01 · PURE C++ CORE Native Heap

Zero-Abstraction Pointer Control

Engineered purely on native pointers and heap management without relying on STL containers. Every node reference and memory transition is explicitly authored and verified.

PatientNode* node = new PatientNode(id, name);
02 · DYNAMIC GROWTH Elastic Capacity

On-Demand Node Lifecycle

Nodes allocate dynamically on arrival and deallocate upon departure, eliminating static ceilings. Memory footprint scales 1:1 with the active clinic waiting room.

delete dischargedNode; // instant heap reclamation
05 · ENGINEERING CONSTRAINTS

Build the Queue from Scratch

Eliminating third-party libraries exposes full control over dynamic memory, pointer safety, and algorithmic complexity.

CONSTRAINT

Zero STL Dependency

Queue and linked list nodes are written directly from C++ primitives using explicit pointer references and dynamic operators (new / delete).

PERFORMANCE

O(1) Enqueue & Dequeue

Front and rear pointers maintain instant constant-time admission and discharge without requiring linear list traversals.

DIAGNOSTICS

Inspect & Traverse

Linear scan operations display full waiting rosters and locate specific patient records by ID in O(n) worst-case time.

06 · MEMORY ARCHITECTURE

Nodes and Two Pointers Power the Queue

The queue holds a front pointer for discharges and a rear pointer for new admissions.

front Head · Next to Serve
0x1A04 · PatientNode
Patient Data #101 · Sara Ali
next* 0x1A48
0x1A48 · PatientNode
Patient Data #102 · Omar Nabil
next* 0x1B10
rear Tail · Latest Admission
0x1B10 · PatientNode
Patient Data #103 · Karim Adel
next* nullptr
nullptr End of List

front references the head node to be serviced next; advances via front = front->next on dequeue.

rear targets the last arriving patient node; its next pointer resolves to nullptr.

INVARIANT Empty state invariant: front == nullptr && rear == nullptr
07 · ALGORITHMIC EFFICIENCY

Queue Operations and Time Complexity

Constant-time core queue primitives pair with linear diagnostics for routine clinic management.

Operation Time Complexity Pointer Mechanics Critical Edge Case
Enqueue Admit Patient O(1) Allocates node via new, links rear->next, updates rear If empty, front and rear both point to new node
Dequeue Call Next O(1) Saves front node, advances front to next, calls delete If queue becomes empty, sets rear = nullptr
Search Find by ID O(n) Traverses from front checking target patient ID until match Returns not found if list exhausts
Display Print Roster O(n) Walks node-by-node printing formatted patient roster Notifies console immediately if empty
08 · SYSTEM INTERACTION

A Simple Console Menu Drives the Workflow

A persistent console loop processes administrator input and routes actions directly into queue operations.

clinic_queue.exe — C++ Console Runtime
=== CLINIC QUEUE MANAGEMENT SYSTEM ===
[1] Add Patient (Enqueue)
[2] Call Next Patient (Dequeue)
[3] Search Patient by ID
[4] Display Waiting Roster
[5] Exit & Release Memory
--------------------------------------
> Enter choice: 1
> Patient ID: 104
> Patient Name: Nadia Samir
[OK] Enqueued #104 (Nadia Samir) at rear (0x1B80) in O(1).
09 · INTERACTIVE SHOWCASE

Live Singly Linked List Queue Simulator

Test real-time FIFO admissions, discharges, pointer updates, and O(n) ID search directly in the browser.

Enqueue Patient O(1)
Search by ID O(n)
Queue Operations
front* nullptr
rear* nullptr
Queue Size 0
Empty Invariant true
Last Operation Initialized sample clinic queue.
Heap & Pointer Trace C++ Memory Model
10 · SOURCE IMPLEMENTATION

Memory-Safe C++ Implementation

Clean object-oriented encapsulation with explicit pointer management and leak-free destructor cleanup.

11 · CONCLUSION & DISCUSSION

Thank You for Your Attention

Dynamic singly linked lists deliver strict FIFO fairness, constant-time triage transitions, and zero static memory waste.

O(1) Core

Instant Admissions & Calls

Dual front and rear pointers guarantee predictable throughput under peak load.

0% Waste

Dynamic Heap Allocation

Memory grows and shrinks cleanly with patient volume without fixed array limits.

Leak-Free

Deterministic Cleanup

Iterative destructor traversal reclaims every allocated PatientNode on exit.

Questions & Live Code Review Innovation University · Faculty of Computers & Information Technology · Group 24 (2026/2027)
12 · PRESENTATION FINALE

Thank You for Listening

Innovation University · Faculty of Computers & Information Technology · Group 24

End of Deck Clinic Queue Management System · Group 24
Back to Cover