Amazon interview question

Design Algorithm on Chess board