← Amazon questions
CodingReported in a candidate post, Aug 2021

Rearrange characters so no two adjacent are same

Filed under Amazon · Also reported at Adobe

Given a string s, rearrange the characters of s so that any two adjacent characters are not the same. Return any possible rearrangement. If not possible, return an empty string.

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.