← Swiggy questions
CodingReported in a candidate post, Sep 2022

Replace substrings using source, target and index arrays

Filed under Swiggy

Given a string s and three arrays indices, sources and targets of equal length, perform all replacements simultaneously on the original string: for each i, if sources[i] occurs in s starting exactly…

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

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