Microsoft Interview Question

task scheduling problem of leetcode