leetcodeSolution to some Leetcode problems written in C++ |
git clone git://git.dimitrijedobrota.com/leetcode.git |
Log | Files | Refs | README | LICENSE |
1539.cpp (160B)
0 class Solution { 1 public: 2 int findKthPositive(vector<int> &arr, int k) { 3 for (int n : arr) 4 if (n <= k) k++; 5 return k; 6 } 7 };