HI there - I am wanting to try to efficiently add various combos of multiple arrays to try to find a set that has non-zero elements.
This is an abbreviated version. I have a set of ~300 arrays x 30 elements in each array to try to find a complete set of sets.
let arr1 = [0, 1, 0, 1, 0, 1, 0, 0, 1, 0]
let arr2 = [1, 0, 0, 1, 1, 1, 1, 0, 0, 1]
let arr3 = [1, 1, 0, 1, 1, 1, 0, 0, 0, 0]
let arr4 = [0, 1, 0, 0, 1, 1, 0, 1, 0, 0]
Update:
Assume that instead of individual arrays, there is one matrix and we are adding the combination of columns in matrices to find a matching set.