I have a Map<String, List<String>>
with values as below.
p1 -> [c1, c2]
p2 -> [c1]
p3 -> [c1,c2]
How to group the keys based on exactly matching list of values into any collection to achieve something like below. Expected results for the above example:
[p1,p3] -> [c1, c2]
[p2] -> [c1]