Question
Simulate a single-CPU round-robin scheduler. You are given a list of tasks as `[name, burst]` (CPU time each needs) in arrival order, all present at time 0, and a `quantum`. Each turn the CPU runs the front task for `min(quantum, remaining)` time units, advancing the clock; if the task still has work left it goes to the back of the queue, otherwise it completes. Return a list of `[name, completion_time]` in the order tasks complete.
round_robin(tasks: list[list], quantum: int) → list[list][[["A",4],["B",2]],2]out[["B",4],["A",6]]State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.