Shortest Substring Deletion for Distinct Remaining Characters
CodingPhoneSoftware EngineerReported Sep, 2026
Company question banks are included with the Insider plan.
Given a lowercase English string s, delete one contiguous substring so that all remaining characters are distinct. The remaining prefix and suffix are concatenated. Return the minimum number of...