Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 955. Delete Columns to Make Sorted II
Given an array of equal-length strings, remove the minimum number of column indices so that the resulting strings (after deletions) are in nondecreasing lexicographic order. This is typically solved with a greedy left-to-right scan of columns, checking pairwise adjacent rows and deleting any column that would create an inversion while keeping columns that confirm relative order.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.