Feature flag range tracker

Write codeHard40 min

Your task

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.

Examples

range_module(ops: list[list]) -> list[bool]
Example 1
Inputrange_module([["add", 10, 20], ["remove", 14, 16], ["query", 10, 14], ["query", 13, 15], ["query", 16, 17]])
Output[True, False, True]