Consider a list like . Here 'a','b','c' are
objects and 1,3,4,2 are their instance ids and they are unique e.g. a.1
and b.1 cannot exist together. From this list i want to generate
multiple lists such that each list must have one and only one instance
of every object.
Thus, for the above list, my output should be:
Another example: Let l = . Then
output should be [,,
Can anyone suggest me a time-efficient (non brute force) method for doing this??