You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/com/fishercoder/solutions/_336.java
+2-15
Original file line number
Diff line number
Diff line change
@@ -6,19 +6,6 @@
6
6
importjava.util.List;
7
7
importjava.util.Map;
8
8
9
-
/**336. Palindrome Pairs
10
-
*
11
-
* Given a list of unique words, find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e. words[i] + words[j] is a palindrome.
12
-
13
-
Example 1:
14
-
Given words = ["bat", "tab", "cat"]
15
-
Return [[0, 1], [1, 0]]
16
-
The palindromes are ["battab", "tabbat"]
17
-
Example 2:
18
-
Given words = ["abcd", "dcba", "lls", "s", "sssll"]
19
-
Return [[0, 1], [1, 0], [3, 2], [2, 4]]
20
-
The palindromes are ["dcbaabcd", "abcddcba", "slls", "llssssll"]
21
-
*/
22
9
publicclass_336 {
23
10
24
11
publicstaticclassSolution1 {
@@ -36,9 +23,9 @@ public List<List<Integer>> palindromePairs(String[] words) {
0 commit comments