Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc13465c

Browse files
refactor 1065
1 parent9b42b9e commitc13465c

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

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

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,6 @@
55
importjava.util.Collections;
66
importjava.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
publicclass_1065 {
349
publicstaticclassSolution1 {
3510
publicint[][]indexPairs(Stringtext,String[]words) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp