We are given a square board of size n*n, that is partially filled with 0s and 1s. We need to fill the board according to the following rules:
- We need to place 0 or 1 in each empty cell
- 1s and 0s already on the board cannot be removed
- All rows need to be distinct i.e. no two rows can be the same in the solved board
- All columns need to be distinct i.e. no two columns can be the same in the solved board
- Any row or column must have an equal number of 1s and 0s
- More than two of the same digits can't be adjacent i.e. 3 ones or 3 zeros cannot be adjacent either horizontally or vertically 