Amazon Interview Question

Design Algorithm on Chess board