Python3 Approach Induction Left->Right Greedy Sorted and Track Continuous Prefixes
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```python3 []\n\'\'\'\nURL := https://leetcode.com/problems/delete-columns-to-make-sorted-ii/description/\n955. Delete Columns to Make Sorted II\n\nComplexity\nLet S := #-strings, N := len(longest string)\nEach string is of same length!!!\nTime = O(SN)\nSpace = O(1) ( E ) O(1) ( I ) \n\nApproach : Greedy, Sorting, Lexicographic ordering\nInduction and proceed left -> right only ( think of first col / single col case ) \n\n15 mins to solutioning\n\'\'\'\nclass Solution:\n    def minDeletionSize(self, strs: List[str]) -> int:\n        firstWord = strs[0]\n        n = len(firstWord)\n        s = len(strs)\n        numDelColumns = 0\n        # if cur column is sorted, escape out earlier\n        prefixes = ["" for x in range(len(strs))]\n        for column in range(n):\n            ptr = 0\n            colSortStatus = True\n            prefixCol = []\n            for ptr in range(s - 1):\n                curWord = strs[ptr]\n                nextWord = strs[ptr + 1]\n                curLet = curWord[column]\n                nextLet = nextWord[column]\n                curVal = prefixes[ptr] + curLet\n                nextVal = prefixes[ptr+1] + nextLet\n                if(curVal > nextVal):\n                    colSortStatus = False\n                    break\n            if(colSortStatus):\n                for ptr in range(s):\n                    curWord = strs[ptr]\n                    letter = curWord[column]\n                    prefixes[ptr] += letter\n            elif(colSortStatus == False):\n                numDelColumns += 1\n        return numDelColumns\n                \n\n\n\n\n\n\n```
['Array', 'String', 'Greedy', 'Python3']