Spectrum Interview Question

Dealing with different priorities