Akamai Interview Question

Since I am a chess player, a coding question was based on that