Mastercard interview question

8-Queens problem