It took a long enough time but question worth it
C++\nclass Solution {\npublic:\n    int minDeletionSize(vector<string>& a) {\n        int n=a.size();\n        if(!n)return 0;\n        int m=a[0].size();\n    
```C++\nclass Solution {\npublic:\n    int minDeletionSize(vector<string>& a) {\n        int n=a.size();\n        if(!n)return 0;\n        int m=a[0].size();\n        int ans=0;\n        int i,j;\n        vector<bool> sorted(n-1,false);\n        for(j=0;j<m;j++){\n            bool flag=true;\n            for(i=0;i<n-1;i++){\n                // cout<<"j= "<<j<<" i= "<<i<<" sorted_i= "<<sorted[i]<<endl;\n                if(!sorted[i] and a[i+1][j]<a[i][j])\n                {\n                    ans++;\n                    flag=false;\n                    // cout<<"i= "<<i<<" j= "<<j<<endl;\n                    break;\n                }\n            }\n                if(!flag)continue;\n                for(i=0;i<n-1;i++)\n                    sorted[i]=sorted[i] || (a[i+1][j]>a[i][j]);\n        }\n        return ans;\n    }\n};\n```
['C']