Dawn Foods Interview Question

Scheduling algorithm problem pseudocode is fine