Question
Deterministically simulate round-robin scheduling of jobs on a single CPU. Each job is (name, burst) where burst is the integer time units of work remaining. Given the job list (the initial ready-queue order) and an integer 'quantum', repeatedly take the front job, run it for min(quantum, remaining) units, and if it still has work left push it to the back of the queue; if it finishes, record its completion time. Time starts at 0 and advances by the units actually run. Return a list of (name, completion_time) tuples in the order jobs complete. Assume all bursts are positive and names are unique. The job list may be empty.
round_robin(jobs: list[tuple], quantum: int) → list[tuple][[["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.