โ† Arcesium questions

Swap Two Characters in a Large String

Filed under Arcesium

Given a large string S and two characters c1 and c2, replace all occurrences of c1 with c2 and c2 with c1 efficiently.

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

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