Question d’entretien chez Meta

I got a question from leetcode, Task Scheduler.