We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4edd88d commit ebb9cd7Copy full SHA for ebb9cd7
Python/palindrome-pairs.py
@@ -1,5 +1,4 @@
1
-# Time: O(n * k^2), n is the number of the words,
2
-# k is the max length of the words.
+# Time: O(n * k^2), n is the number of the words, k is the max length of the words.
3
# Space: O(n * k)
4
5
# Given a list of unique words. Find all pairs of indices (i, j)
@@ -40,8 +39,7 @@ def palindromePairs(self, words):
40
39
return res
41
42
43
44
45
46
# Trie solution.
47
class TrieNode:
0 commit comments