Question d’entretien chez Whatnot

Leetcode question with additional questions about time complexity.