Roblox Interview Question

First technical interview question was about processing an array of tasks which was really just an array of characters. There were duplicate tasks in the array and each time you would process a specific task, it would go on cooldown for a duration of cycles. You needed to return the order in which the tasks were processed and how many cycles it took. Any solution is fine, I'm pretty sure they expect you to solve it simply at first then optimize.