set-membership-testing-pattern

Status: IN

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.

Source: entries/2026/06/06/jewels-and-stones-solution.md, entries/2026/06/06/keep-multiplying-found-values-by-two-solution.md

JSON