Skip to content

Commit 1061560

Browse files
refactor 616
1 parent d0d8155 commit 1061560

File tree

1 file changed

+0
-27
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-27
lines changed

src/main/java/com/fishercoder/solutions/_616.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 616. Add Bold Tag in String
5-
*
6-
* Given a string s and a list of strings dict,
7-
* you need to add a closed pair of bold tag <b> and </b>
8-
* to wrap the substrings in s that exist in dict.
9-
* If two such substrings overlap, you need to wrap them together by only one pair of closed bold tag.
10-
* Also, if two substrings wrapped by bold tags are consecutive, you need to combine them.
11-
12-
Example 1:
13-
Input:
14-
s = "abcxyz123"
15-
dict = ["abc","123"]
16-
Output:
17-
"<b>abc</b>xyz<b>123</b>"
18-
19-
Example 2:
20-
Input:
21-
s = "aaabbcc"
22-
dict = ["aaa","aab","bc"]
23-
Output:
24-
"<b>aaabbc</b>c"
25-
26-
Note:
27-
The given dict won't contain duplicates, and its length won't exceed 100.
28-
All the strings in input have length in range [1, 1000].
29-
*/
303
public class _616 {
314

325
public static class Solution1 {

0 commit comments

Comments
 (0)