1539.cpp (160B)
1 class Solution { 2 public: 3 int findKthPositive(vector<int> &arr, int k) { 4 for (int n : arr) 5 if (n <= k) k++; 6 return k; 7 } 8 };