Domanda di colloquio di Google

Algorithm based Leetcode Hard question