for example, there are n=7 socks with colors ar=[1,2,1,2,1,3,2]. there is one pair of color 1 and one of color 2.
By Patrick Mraz at Oct 27 2020