Skip to content

Instantly share code, notes, and snippets.

View mudasarmajeed5's full-sized avatar
:copilot:
Focusing

Mudassar Majeed mudasarmajeed5

:copilot:
Focusing
View GitHub Profile

🚦 Question 1 — Hospital Patient Management System (Queue)

📘 Scenario

You’re implementing a patient management system for a hospital’s emergency room.
Each incoming patient has:

  • name
  • severityLevel (1 = highest priority, 5 = lowest)
  • arrivalNumber (auto-incremented, for tie-breaking)

Patients are treated in order of priority, and within the same priority, first-come-first-served.