Pergunta de entrevista da empresa Amazon

Write an algorithm to find if a King has been Check-mated.