Skip to content

Commit c13465c

Browse files
refactor 1065
1 parent 9b42b9e commit c13465c

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

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

-25
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,6 @@
55
import java.util.Collections;
66
import java.util.List;
77

8-
/**
9-
* 1065. Index Pairs of a String
10-
*
11-
* Given a text string and words (a list of strings),
12-
* return all index pairs [i, j] so that the substring text[i]...text[j] is in the list of words.
13-
*
14-
* Example 1:
15-
* Input: text = "thestoryofleetcodeandme", words = ["story","fleet","leetcode"]
16-
* Output: [[3,7],[9,13],[10,17]]
17-
*
18-
* Example 2:
19-
* Input: text = "ababa", words = ["aba","ab"]
20-
* Output: [[0,1],[0,2],[2,3],[2,4]]
21-
* Explanation:
22-
* Notice that matches can overlap, see "aba" is found in [0,2] and [2,4].
23-
*
24-
* Note:
25-
*
26-
* All strings contains only lowercase English letters.
27-
* It's guaranteed that all strings in words are different.
28-
* 1 <= text.length <= 100
29-
* 1 <= words.length <= 20
30-
* 1 <= words[i].length <= 50
31-
* Return the pairs [i,j] in sorted order (i.e. sort them by their first coordinate in case of ties sort them by their second coordinate).
32-
* */
338
public class _1065 {
349
public static class Solution1 {
3510
public int[][] indexPairs(String text, String[] words) {

0 commit comments

Comments
 (0)