Pregunta de entrevista de PerBlue

Two coding questions close to leetcode easy problems