Add Bold Tag in String

Given a string s and an array of strings words, wrap every substring of s that matches any words[i] in <b> and </b> tags.

Rules:

  • Mark every occurrence of every word, including overlapp...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: