Leetcode Roasting of the Day: Replace Words
Let’s roast! Today’s Leetcode challenge is: 648. Replace Words Given a list of dictionary words, replace all words in the given sentence that has the prefix of the word match to the dictionary word, into that prefix. So, if we have a dictionary word “cat” and a sentence “the cattle”, we replace “cattle” into “cat” since “cat” is a prefix of “cattle”, hence producing the resulting sentence “the cat”. It...