← Accolite questions
CodingReported in a candidate post, Jul 2019

Smallest Substring to Replace for Stable String

Filed under Accolite

Given a string of length n containing characters 'D', 'H', 'B', 'C', find the minimum length of a substring that, if replaced, makes the string 'stable'. A string is stable if each character appears…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Accolite questions

Collected from public candidate posts and coding forums. Updated Nov 2026.