“The optimal solution to this problem runs in O(n) time and takes O(n) space.”
From the constraints, it looks like k can exceed n. In this case, would our time complexity become a function of k? Should we adjust the optimal time complexity accordingly?
Course: Grokking Coding Interview Patterns in Python - Learn Interactively
Lesson: Find the First K Missing Positive Numbers - Grokking Coding Interview Patterns in Python