Case #1: 3
011
101
110
Case #2: 4
0111
1001
1001
1110
