Palo Alto Networks interview question

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