Question d’entretien chez Samsung Electronics

Calculate area type algorithm question.