Domanda di colloquio di Canva

It was leetcode style DSA question