{"id":"jewels-stones-linear-time","text":"`num_jewels_in_stones` runs in O(J + S) time and O(J) space by converting `jewels` to a set for O(1) membership testing, then iterating `stones` with a generator expression.","truth_value":"IN","source":"entries/2026/06/06/jewels-and-stones-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"jewels-stones-linear-time","truth_value":"IN","reason":"premise"}]}}