LIS | Multiset
\nclass Solution {\npublic:\n    \n    int findAns(vector<int> &v) {\n        multiset<int>s;\n        \n        for(int i=0; i<v.size(); i++) {\n            if
```\nclass Solution {\npublic:\n    \n    int findAns(vector<int> &v) {\n        multiset<int>s;\n        \n        for(int i=0; i<v.size(); i++) {\n            if (s.empty()) {\n                s.insert(v[i]);\n                continue;\n            }\n            s.insert(v[i]);\n            multiset<int>::iterator itr = s.upper_bound(v[i]);\n            if (itr == s.end()){\n                continue;\n            }\n            s.erase(itr);\n        }\n        \n        return v.size()-s.size();\n    }\n    \n    int kIncreasing(vector<int>& arr, int k) {\n        \n        vector<bool>visited(arr.size(),false);\n        int ans = 0;\n        for(int i=0 ;i <arr.size();i++){\n            if (visited[i] ==true ) {\n                continue;\n            }\n            \n            vector<int> v;\n            int j = i;\n            while(j<arr.size()){\n                visited[j] = true;\n                v.push_back(arr[j]);\n                j = j +k;\n            }\n            \n            ans = ans + findAns(v); \n            \n        }\n        \n        return ans;\n    }\n};\n```
['C']