{"id":"set-membership-testing-pattern","text":"Multiple solutions (jewels-and-stones, keep-multiplying-found-values-by-two) use the same idiom: convert an input collection to a `set` for O(1) amortized membership testing before iterating over another collection. This is the repo's standard approach for membership-check problems.","truth_value":"IN","source":"entries/2026/06/06/jewels-and-stones-solution.md, entries/2026/06/06/keep-multiplying-found-values-by-two-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"set-membership-testing-pattern","truth_value":"IN","reason":"premise"}]}}