Meta Interview Question

It was a leetcode question