โ† Walmart questions
CodingMedium

Replace all occurrences of substring s2 with s3 in s1

Filed under Walmart

Given three strings s1, s2, and s3, replace every occurrence of the substring s2 in s1 with s3. Return the resulting 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 Walmart questions

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