Pregunta de entrevista de Xiaomi

Weighted Job Scheduling DSA question