Domanda di colloquio di Google

Simple DSA question, which could be seen from leetcode