Pregunta de entrevista de Palo Alto Networks

I had to do two easy-medium LC style questions (one debugging, another LC type)