โ† Microsoft questions

In-place string subtraction

Filed under Microsoft

Given two character arrays or strings s1 and s2, modify s1 in-place to remove all occurrences of any character that appears in s2. Return the modified s1 (or the new length / null-terminated prefix).

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

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