Fill in countCommon so that it returns the number of distinct values appearing in both arrays.
countCommon
Use two sets: one holding the values of a, another collecting the matches so repeats collapse. The program prints 2.
a
2