Meta Interview Question

It was a typical coding question. Nothing too complicated