Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal

You are given an array of integers arr, where each element represents the number of hours needed to complete a task. Tasks are executed in a round-robin fashion, with each task receiving one hour of processing time per cycle. If a task is not completed within its allocated hour, it is re-added to the queue for the next cycle. Only one task can be processed at a time, and this process continues until all tasks are finished.

Test Cases
Input
Output
Expected