Pregunta de entrevista de Cognite

Leetcode easy or very easy question.