C++ Solution, group and LIS.
\n\n1. group arr into k groups.\n2. get LIS for each group, accumulate group.size - LIS.\n\nclass Solution {\npublic:\n    int LIS(vector<int> &arr) {\n        
\n\n1. group arr into k groups.\n2. get LIS for each group, accumulate `group.size - LIS`.\n```\nclass Solution {\npublic:\n    int LIS(vector<int> &arr) {\n        vector<int> lis(arr.size(), INT_MAX);\n        int ans = 0;\n        for(int i = 0; i < arr.size(); i++) {\n            int idx = upper_bound(lis.begin(), lis.end(), arr[i]) - lis.begin();\n            ans = max(idx + 1, ans);\n            lis[idx] = arr[i];\n        }\n        return arr.size() - ans;\n    }\n    int kIncreasing(vector<int>& arr, int k) {\n        vector<vector<int> > group(k);\n        for(int i = 0; i < k; i++) {\n            for(int j = i; j < arr.size(); j+=k) {\n                group[i].push_back(arr[j]);\n            }\n        }\n        int ans = 0;\n        for(auto &v : group) {\n            ans += LIS(v);\n        }\n        return ans;\n    }\n};\n```
[]