Algorithm · Airbnb · Easy
Given a text string, substitute designated words using a mapping of replacement values. Input: A string containing the text to process. A dictionary that maps target words to their replacement words. Output: Return the text string after applying the requested substitutions. Example The mapped words are replaced wherever they appear in the input text.
Checking your access…