Solution
C++ []\nclass Solution {\npublic:\n    int minDeletionSize(vector<string>& strs) {\n        auto strsLength = strs.size();\n        auto strLength = strs[0].siz
```C++ []\nclass Solution {\npublic:\n    int minDeletionSize(vector<string>& strs) {\n        auto strsLength = strs.size();\n        auto strLength = strs[0].size();\n\n        auto sortedStrs = vector<string>(strsLength, "");\n\n        for (size_t i = 0u; i < strLength; ++i) {\n            for (size_t j = 0u; j < strsLength; ++j) {\n                sortedStrs[j] += strs[j][i];\n            }\n            auto prev = sortedStrs[0];\n            auto sortStatus = 1;\n            for (size_t j = 1u; j < sortedStrs.size(); ++j) {\n                const auto current = sortedStrs[j];\n                if (prev > current) {\n                    sortStatus = -1;\n                    break;\n                } else if (prev == current) {\n                    sortStatus = 0;\n                }\n                prev = current;\n            }\n            if (sortStatus == -1) {\n                for (int j = 0; j < strsLength; j++) {\n                    sortedStrs[j].pop_back();\n                }\n            } else if (sortStatus == 1) {\n                return i - sortedStrs[0].size() + 1;\n            }\n        }\n        return strLength - sortedStrs[0].size();\n    }\n};\n```\n\n```Python3 []\nclass Solution:\n    def minDeletionSize(self, strs: List[str]) -> int:\n        m, n = len(strs), len(strs[0])\n        res = 0\n        unsorted = set(range(m - 1))\n        for j in range(n):\n            if any(strs[i][j] > strs[i+1][j] for i in unsorted):\n                res += 1\n            else:\n                unsorted -= {i for i in unsorted if strs[i][j] < strs[i+1][j]}\n        return res\n```\n\n```Java []\nclass Solution {\n    public int minDeletionSize(String[] strs) {\n        int cnt=0,j=0;\n        boolean compared[]=new boolean[strs.length];\n        for(int i=0;i<strs[0].length();i++){\n            boolean currCompared[]=new boolean[strs.length];\n            for(j=0;j<strs.length-1;j++){\n                if(!compared[j]){ \n                    if(strs[j].charAt(i)>strs[j+1].charAt(i)){\n                        cnt++;\n                        break;\n                    }\n                    else if(strs[j].charAt(i)<strs[j+1].charAt(i))\n                        currCompared[j]=true;\n                }\n            }\n            if(j==strs.length-1)\n                for(;j>0;j--) compared[j-1]|=currCompared[j-1];\n        }\n        return cnt;\n    }\n}\n```\n
['C++', 'Java', 'Python3']