you give n x n binary grid board in swap row column otherreturn minimum number move transform board chessboard board if task impossible return 1A chessboard board board 0s 1s 4directionally adjacent Example 1input board 0110011010011001output 2explanation one potential sequence move shownthe swap second columnthe second swap second rowExample 2input board 0110output 0explanation also note board 0 leave corner valid chessboardexample 3input board 1010output 1explanation no matter sequence move end valid chessboard Constraintsn boardlengthn boardilength2 n 30boardij 0 1