Pergunta de entrevista da empresa Google

Leetcode hard question, can't share because NDA