Status: IN
The single-pass idiom `count += seen[num]; seen[num] += 1` used in `numIdenticalPairs` is mathematically equivalent to summing `C(freq, 2)` for each distinct value but avoids a second pass over the frequency map.
Source: entries/2026/06/06/number-of-good-pairs-solution.md
JSON