Meta Interview Question

4 medium leetcode type questions. I cannot provide much details