← Morgan Stanley questionsCodingeasyReported in a candidate post, Jul 2021 Remove consecutive characters in a string
Filed under Morgan Stanley
Given a string, remove all consecutive duplicate characters, leaving only one character for each sequence of identical adjacent characters.
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 Morgan Stanley questions
Collected from public candidate posts and coding forums. Updated Nov 2026.