Pergunta de entrevista da empresa Google

Leetcode question medium and hard range.