Meta interview question

It was just a standard leetcode question