File tree 1 file changed +0
-21
lines changed
src/main/java/com/fishercoder/solutions
1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change 3
3
import java .util .stream .Collectors ;
4
4
import java .util .stream .IntStream ;
5
5
6
- /**
7
- * 5083. Occurrences After Bigram
8
- * <p>
9
- * Given words first and second, consider occurrences in some text of the form "first second third",
10
- * where second comes immediately after first, and third comes immediately after second.
11
- * For each such occurrence, add "third" to the answer, and return the answer.
12
- * <p>
13
- * Example 1:
14
- * Input: text = "alice is a good girl she is a good student", first = "a", second = "good"
15
- * Output: ["girl","student"]
16
- * <p>
17
- * Example 2:
18
- * Input: text = "we will we will rock you", first = "we", second = "will"
19
- * Output: ["we","rock"]
20
- * <p>
21
- * Note:
22
- * 1 <= text.length <= 1000
23
- * text consists of space separated words, where each word consists of lowercase English letters.
24
- * 1 <= first.length, second.length <= 10
25
- * first and second consist of lowercase English letters.
26
- */
27
6
public class _1078 {
28
7
public static class Solution1 {
29
8
public String [] findOcurrences (String text , String first , String second ) {
You can’t perform that action at this time.
0 commit comments