Domanda di colloquio di Google

There was 2 hard Level Leetcode question.