← Goldman Sachs questions

Remove alternate duplicates

Filed under Goldman Sachs

Given a string, return a new string that removes alternate occurrences of duplicate characters. Specifically, keep the first occurrence of each duplicate character, remove the second, keep the third…

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 Goldman Sachs questions

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