Easy solution c++
\n\n    int minDeletionSize(vector<string>& strs) {\n        int M = strs.size();\n        int N = strs[0].size();\n        int res = 0;\n        vector<int> or
\n```\n    int minDeletionSize(vector<string>& strs) {\n        int M = strs.size();\n        int N = strs[0].size();\n        int res = 0;\n        vector<int> ordered(M);\n        for (int j = 0; j < N; j++) {\n            int i;\n            for (i = 0; i < M-1; i++) {\n                if (strs[i][j] > strs[i+1][j] && !ordered[i]) {\n                    res++;\n                    break;\n                }\n            }\n            if (i == M-1) {\n                for (i = 0; i < M-1; i++) {\n                    if (strs[i][j] < strs[i+1][j]) {\n                        ordered[i] = 1; // ordered[i] means i and i+1 are already in right order, so we don\'t care what happens in later columns\n                    }\n                }\n            }\n        }\n        return res;\n    }\n```
[]