Skip to content

Commit ebb9cd7

Browse files
committed
Update palindrome-pairs.py
1 parent 4edd88d commit ebb9cd7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Python/palindrome-pairs.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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.
1+
# Time: O(n * k^2), n is the number of the words, k is the max length of the words.
32
# Space: O(n * k)
43

54
# Given a list of unique words. Find all pairs of indices (i, j)
@@ -40,8 +39,7 @@ def palindromePairs(self, words):
4039
return res
4140

4241

43-
# Time: O(n * k^2), n is the number of the words,
44-
# k is the max length of the words.
42+
# Time: O(n * k^2), n is the number of the words, k is the max length of the words.
4543
# Space: O(n * k)
4644
# Trie solution.
4745
class TrieNode:

0 commit comments

Comments
 (0)