Meta Interview Question

Leet code average difficulty problem