Given N arrays, find the minimum number of arrays required such that their union is equal to the target array
Example
[1],[2],[1,1],[1,2,3][4]
Target array [1,2,3,4]
Answer [1,2,3] and [4].
Given N arrays, find the minimum number of arrays required such that their union is equal to the target array
Example
[1],[2],[1,1],[1,2,3][4]
Target array [1,2,3,4]
Answer [1,2,3] and [4].
Link to the question?
It should be union not intersection.
It just striked me, there might be a similar question so I am not sure
S
Anybody?
Complexities?
anything other than exponential …