{"id":"hash-set-dimension-reduction","text":"For triplet-constraint problems, precomputing a hash set of valid values for one dimension (e.g., perfect squares up to n^2) reduces an O(n^3) brute force to O(n^2) by replacing the innermost loop with an O(1) set membership check.","truth_value":"IN","source":"entries/2026/06/06/count-square-sum-triples-solution.md","source_url":"","source_hash":"","justifications":[],"dependents":[],"metadata":{},"created_at":"","updated_at":"","reviewed_at":"","verified_at":"","retracted_at":"","explanation":{"steps":[{"node":"hash-set-dimension-reduction","truth_value":"IN","reason":"premise"}]}}