Search
⌘K

Leetcode 616. Add Bold Tag in String

Given a string s and a list of words, wrap every substring of s that matches any word with <b>...</b>, merging overlapping or adjacent matches so tags are not nested or duplicated. The core challenge is to efficiently locate all matching intervals and merge them before reconstructing the final tagged string.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.