Meta Interview Question

It was just a standard leetcode question