arithmetic-triplets-set-lookup-linear

Status: IN

`count_arithmetic_triplets` achieves O(n) time via set-based membership lookups, treating each element as the largest of a potential triplet and checking for `x - diff` and `x - 2*diff` in a `seen` set

Source: entries/2026/06/06/number-of-arithmetic-triplets-solution.md

JSON