Back to problems

Anagram Word Replacement in Phrases

Algorithm · Oracle · Medium

Requirements Inputs are phrases: List[str] and words: List[str]. Inspect every phrase to see whether one of its words can be substituted with an item from words when the two words are anagrams. Return a List[int] containing one result for each phrase: each value is the character offset where an eligible word begins. In particular, a result of 0 means the matching word starts at the first character of that phrase. Your implementation must finish all tests before the…

Checking your access…