Mimecast interview question

Some puzzle from leetcode easy