โ† Amazon questions

Remove K duplicate elements

Filed under Amazon

Given a string and an integer k, remove k consecutive identical characters from the string recursively until no more such removals can be made.

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 Amazon questions

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