Given a string `text` and a dictionary `synonyms` where each key is a word and its corresponding value is a list of synonyms, find the lexicographically smallest string that can be formed by replacing the words in `text` with their synonyms from `synonyms`.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak