Domanda di colloquio di NVIDIA

Standard algorithmic question as on leetcode