C++ | Easy To Understand Greedy
\nclass Solution {\npublic:\n    int minDeletionSize(vector<string>& strs) {\n        int n=strs.size();\n        int len=strs[0].length();\n        int ans=0;\
```\nclass Solution {\npublic:\n    int minDeletionSize(vector<string>& strs) {\n        int n=strs.size();\n        int len=strs[0].length();\n        int ans=0;\n        vector<int>v;\n        \n        for(int i=1;i<n;i++)\n            v.push_back(i);\n        \n        for(int i=0;i<len;i++)\n        {\n            int flag=0;\n            bool nextCheck=false;\n            vector<int>v2;\n             bool all=false;\n            for(auto j:v)\n            {\n                if(strs[j][i]<strs[j-1][i])\n                {\n                    ans++;\n                    // cout<<j<<"->"<<i<<endl;\n                    nextCheck=true;\n                    all=true;\n                    break;\n                }\n                else if(strs[j][i]==strs[j-1][i])\n                {\n                    nextCheck=true;\n                    v2.push_back(j);\n                }\n            }\n            if(!all)\n            v=v2;\n            if(!nextCheck)\n                return ans;        \n            \n        }\n        \n        return ans;\n    }\n};\n```
['Greedy']