616. Add Bold Tag in String

Given a string s and an array of strings words (dictionary), add bold tags <b> and </b> around each substring in s that matches any word in the dictionary. The bold sections should merge if they overlap.

Examples
Input: ["abcde",["a"]]
Output: "<b>a</b>bcde"
Hints

616. Add Bold Tag in String

Given a string `s` and an array of strings `words` (dictionary), add bold tags `<b>` and `</b>` around each substring in `s` that matches any word in the dictionary. The bold sections should merge if they overlap.