Meta interview question

Questions were asked from Leetcode