Scale interview question

live case optimization question about scheduling