Meta interview question

Leetcode style problems with followup