EASYasked at 1 company

Delete Columns to Make Sorted

A easy-tier problem at 75% community acceptance, tagged with Array, String. Reported in interviews at Garmin and 0 others.

Founder's read

Delete Columns to Make Sorted is an easy array problem that shows up on Garmin assessments. You're given a list of strings and need to count how many columns can be deleted so the remaining strings stay in lexicographically sorted order. The 74% acceptance rate masks a common mistake: many candidates overthink the column deletion logic and miss that you're actually just counting which columns preserve the sort, not reconstructing anything. If you hit this live and blank on the iteration pattern, StealthCoder reads your screen and surfaces a working solution in seconds, invisible to the proctor.

Companies asking
1
Difficulty
EASY
Acceptance
75%

Companies that ask "Delete Columns to Make Sorted"

If this hits your live OA

Delete Columns to Make Sorted is the kind of problem that decides whether you pass. StealthCoder reads the problem on screen and surfaces a working solution in under 2 seconds. Invisible to screen share. The proctor sees nothing. Made by a working Amazon engineer who got tired of watching qualified friends bomb OAs they'd solve cold in an IDE.

Get StealthCoder
What this means

The trap here is treating this like a real deletion problem when it's actually a counting problem. You iterate through each column position, check if deleting that column keeps the strings sorted, and increment a counter. The sort check itself is straightforward: compare each adjacent pair of strings and verify they're in order. Most candidates either try to simulate actual deletion (wasting time and adding bugs) or confuse column indices with character indices. Since the input is small and the logic is linear, the brute-force approach of checking every column works fine. The real insight is recognizing that you only need to count, not transform. If you haven't drilled this exact pattern and the problem catches you mid-OA, StealthCoder sits invisibly and hands you the solution.

Pattern tags

The honest play

You know the problem. Make sure you actually pass it.

Delete Columns to Make Sorted recycles across companies for a reason. It's easy-tier, and most candidates blank under the timer. StealthCoder is the hedge: an AI overlay invisible during screen share. It reads the problem and surfaces a working solution in under 2 seconds. Made by a working Amazon engineer who got tired of watching qualified friends bomb OAs they'd solve cold in an IDE. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Delete Columns to Make Sorted interview FAQ

Is this problem actually easy, or does it trip people up in real interviews?+

The 74% acceptance rate says yes, it's easy, but that 26% failure rate usually comes from overthinking the deletion logic or misunderstanding what 'lexicographically sorted' means across multiple strings. The algorithm itself is straightforward once you see it.

What's the most common mistake on this problem?+

Trying to physically remove columns and rebuild strings instead of just checking if each column deletion preserves sort order. You don't need to reconstruct anything. Just iterate columns, test the sort condition, and count passes.

Do I need to know string comparison inside out to solve this?+

No. Just know that string comparison in most languages works lexicographically by default (comparing character by character left-to-right). This problem doesn't require any advanced string manipulation, just comparisons.

How does this relate to the Array and String topics listed?+

You're iterating through an array of strings (array topic) and working with character-level column logic (string topic). It's a hybrid that tests comfort with nested iteration and understanding how strings order relative to each other.

Is Garmin the only company asking this, or do other places ask it too?+

The input data shows Garmin as the reported company. Like most easy problems, it may appear elsewhere, but Garmin is the confirmed source in this dataset.

Want the actual problem statement? View "Delete Columns to Make Sorted" on LeetCode →

Frequency and company-tag data sourced from public community-maintained interview-report repos. Problem, description, and trademark © LeetCode. StealthCoder is not affiliated with LeetCode.