Google interview question

Solve a medium leetcode qns