Pregunta de entrevista de Meta

There was two coding questions with the first round