Coding Challenge · ADVANCED
In a busy hospital emergency room, patients are assigned a severity score and an arrival timestamp as they check in. The staff must decide which k patients to treat first, always choosing the highest severity; if two patients have the same severity, the one who arrived earlier is treated first. Given a list of patients…