Google Interview Question

2 questions in each phone call, leetcode hard and medium difficulty