Java beat 99% with clear explanation
we need to compare second col, if first col has any equal even if it is already in lexicographic order.\n2. keep previous cols comparision result and update wit
1. we need to compare second col, if first col has any equal even if it is already in lexicographic order.\n2. keep previous cols comparision result and update with new value if previous A[i] == A[i+1].\n```\n    public int minDeletionSize(String[] strs) {\n        int n = strs.length, m = strs[0].length(), i, j;\n        int res = 0;\n        //for every col, need to check whether it will increase the deletion.\n        //need to go through very column, as it\'s possible that prior has == thus still need compare.\n        boolean[] sorted = new boolean[n];\n        for (j = 0; j < m; j++) {\n            for (i = 0; i < n - 1; i++) {\n                if (!sorted[i] && (strs[i].charAt(j) > strs[i + 1].charAt(j))) {\n                    res++;\n                    //find one inordered, then need delete the whole col.\n                    break;\n                }\n            }\n            //the whole colum is sorted, need keep so later cols can refer i.e., x=x<y.\n            if (i == n - 1) {\n                for (int k = 0; k < n - 1; k++) {\n                    //it\'s important to combine previous col\'s result, as FFT | FTF = FTT. F means == here.\n                    sorted[k] |= strs[k].charAt(j) < strs[k + 1].charAt(j);\n                }\n            }\n        }\n        return res;\n    }\n```
['Java']