Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1750. Minimum Length of String After Deleting Similar Ends
Given a string of 'a', 'b', and 'c', repeatedly delete a non-empty prefix and non-empty suffix that are runs of the same character and equal to each other (without overlapping) and return the minimum possible remaining length. This is a two-pointer/greedy problem of shrinking matching uniform ends until characters differ or the pointers cross (n up to 1e5).
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.