We are writing a C# application that will help to remove unnecessary data repeaters. A repeater can only be removed in the case that all data it receives are received by other repeaters. What we need as a first step is explained bellow:
I have collection of int arrays, for example
a. {1, 2, 3, 4, 5}
b. {2, 4, 6, 7}
c. {1, 3, 5, 8, 11, 100}
It may be thousands of such arrays. I need to find arrays that can be removed. An array can only be removed in the case that all its numbers are included in other arrays. In the example above, array a can be removed because its numbers 2 and 4 are in array b and numbers 1, 3, 5 are in array c.
What the best way to do such operation?