Grouping Rules:
- has at least one "1" in the same column
- shares any number of rows in common (see example)
For example:
c0 c1 c2 c3
A 1 0 0 1
B 0 0 1 0
C 0 0 0 1
D 0 1 1 0
E 0 1 0 0
Expected output:
[[A, C], [B, D, E]]
As you can see B and E do not share "1" in columns, but they have "D" in common, therefore all 3 should be grouped