Delete Columns to Make Sorted II
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 {\n    public int minDeletionSize(String[] A) {\n        if (A == null || A.length <= 1) {\n            return 0;\n        }\n        int len = A.length, wordLen = A[0].length(), res = 0;\n        boolean[] cut = new boolean[len];\n    search:\n        for (int j = 0; j < wordLen; j++) {\n            for (int i = 0; i < len - 1; i++) {\n                if (!cut[i] && A[i].charAt(j) > A[i + 1].charAt(j)) {\n                    res += 1;\n                    continue search;\n                }\n            }\n            for (int i = 0; i < len - 1; i++) {\n                if (A[i].charAt(j) < A[i + 1].charAt(j)) {\n                    cut[i] = true;\n                }\n            }\n        }\n        return res;\n    }\n}\n```
['Java']