Number of Unique Categories
Compare each element only with one representative per category found so far; a yes answer merges it into that category, and a run of no answers opens a new one.
Compare each element only with one representative per category found so far; a yes answer merges it into that category, and a run of no answers opens a new one.