gcd-determines-valid-partition

Status: IN

A deck of cards can be partitioned into equal-sized groups of matching values if and only if the GCD of all value frequencies is >= 2 — the solution computes this in a single `reduce(gcd, counts)` fold.

Source: entries/2026/06/06/x-of-a-kind-in-a-deck-of-cards-solution.md

JSON