Meta interview question

There was two coding questions with the first round