Pregunta de entrevista de CSC

asked an easy leetcode question