Axom Technologies interview question

Chessboard game