Problem 3493 · Medium
Two rows are joined when they share at least k distinct values; union-find counts the resulting components.
Open the interactive visualisation