LIS
\nclass Solution {\npublic:\n    int helper(vector<int> v){\n        //find lis\n        vector<int> dp;\n        dp.push_back(v[0]);\n        \n        for(int
```\nclass Solution {\npublic:\n    int helper(vector<int> v){\n        //find lis\n        vector<int> dp;\n        dp.push_back(v[0]);\n        \n        for(int i=1;i<v.size();++i){\n            if(v[i] < dp.back()){\n                int index = upper_bound(dp.begin(),dp.end(),v[i]) - dp.begin();\n                dp[index] = v[i];\n            }\n            else{\n                dp.push_back(v[i]);\n            }\n            \n        }\n        \n        return v.size() - dp.size();\n        \n    }\n    int kIncreasing(vector<int>& arr, int k) {\n        unordered_map<int,vector<int>> mp;\n        for(int i=0;i<arr.size();++i){\n            mp[i % k].push_back(arr[i]);\n        }\n        int sum = 0;\n        for(auto &it : mp){\n            vector<int> v = it.second;\n            sum += helper(v);\n        }\n        return sum;\n    }\n};\n```
['C']