Given a list of lists find the shortest list that is a contiguous sublist of exactly one list.
For example if we had
[[1,2,3],
[1,2,3,4],
[2,4,5,6],
[1,2,4,5,6]]
the shortest contiguous sublist would be [3,4]
since it only appears in the second list.
If there is no unique contiguous sublist (this requires at least one duplicate entry), output an empty list. Here is an example
[[1,2,3],
[1,2,3],
[1,2]]
If there are multiple contiguous sublists of minimal size, you may output any one of them or a list containing all of them. For example if the input was
[[1,2,3],[2],[1],[3]]
You could output either [1,2]
, [2,3]
or [[1,2],[2,3]]
. If you choose to do the latter option you may output singleton lists for the cases where there is only one solution.
The output may occur in the same list more than once as long as it appears in no other list. For example
[[1,2,1,2],[2,1]]
should output [1,2]
because [1,2]
is a sublist of the first list but not the second, even though it is a sublist of the first list in two different ways.
You may take as input a list of lists containing any type so long as that type has more than 100 possible values, i.e. no Booleans.
This is code-golf so answers will be scored in bytes with less bytes being better.
Test Cases
[[1,1]] : [1]
[[1],[1]] : []
[[1,1],[1]] : [1,1]