I have an array arr containing pairs of elements. I need to find the largest subset from that array, such that, each pair wise element in that subset exists in the array arr.
e.g. let arr = [(a,b), (a,c), (a,d), (b,d)]
Then, the largest subset would be {a,b,d}, because all possible pair-wise combinations in the subset exists in arr.
[(a,b), (b,d), (d, c), (c,a)]