Date: 08/05/2019
There is series of integer pairs like (1,3),(7,10),(5,7),(4,1). Create unique grouping if any value in pair matches with any value of other pairs. So for above example output become: (1,3,4) and (7,10,5). Any suggestion will be appreciated.