Question
Implement a feature-flag rollout tracker that maintains a set of half-open integer ranges [left, right). You are given a list of operations, each one of: ["add", left, right] activates the rollout over that range; ["remove", left, right] deactivates it; ["query", left, right] reports whether the ENTIRE half-open range [left, right) is currently fully active. Process the operations in order and return a list of booleans, one per query operation. Ranges can be added, partially removed, and re-added many times.
range_module(ops: list[list]) → list[bool][[["add",10,20],["remove",14,16],["query",10,14],["query",13,15],["query",16,17]]]out[true,false,true]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.