c++ solution based on frute force
\nclass Solution {\npublic:\n    int minDeletionSize(vector<string>& strs) {\n        int width = strs.front().size();\n        int delete_columns = 0;\n       
```\nclass Solution {\npublic:\n    int minDeletionSize(vector<string>& strs) {\n        int width = strs.front().size();\n        int delete_columns = 0;\n        vector<bool> strict_larger(strs.size(), false);\n        stack<int> candidate_strict_larger_indexes, empty;\n        int w = 0;\n        while(w < width){\n            // printf("w=%d\\n", w);\n            bool need_delete = false;\n            for (int i = 1; i < strs.size(); i++){\n                char former = strs[i - 1][w];\n                char latter = strs[i][w];\n                if (former > latter && !strict_larger[i]){\n                    need_delete = true;\n                    break;\n                }\n                if (latter > former && !strict_larger[i]){\n                    candidate_strict_larger_indexes.push(i);\n                }\n            }\n            if (need_delete){// we should delete this column\n                delete_columns++;\n                candidate_strict_larger_indexes = empty;\n            }\n            else{// we should update the strict_larger[index] with true\n                while(!candidate_strict_larger_indexes.empty()){\n                    int index = candidate_strict_larger_indexes.top();\n                    candidate_strict_larger_indexes.pop();\n                    strict_larger[index] = true;\n                }\n            }\n            w++;\n        }\n        return delete_columns;\n    }\n};\n```
[]