Simple greedy approach with O(n) time and space complexity
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int minDeletionSize(vector<string>& strs) {\n        int n=strs.size();\n        int m=strs[0].size();\n        vector<string>rs(n,"");\n\n        for(int i=0;i<m;i++){\n\n            for(int j=0;j<n;j++){\n                rs[j]+=strs[j][i];\n            }\n            int flag=1;\n\n            for(int j=1;j<n;j++){\n                if(rs[j]<rs[j-1]){\n                    flag=-1;\n                    break;\n                }\n            }\n\n            if(flag==-1){\n                for(int j=0;j<n;j++){\n                    rs[j].pop_back();\n                }\n            }\n        }\n        return m - rs[0].size();\n    }\n};\n```
['C++']