Frage im Vorstellungsgespräch bei Whatnot

Leetcode question with additional questions about time complexity.