Whatnot Interview Question

Leetcode question with additional questions about time complexity.