Skip to content

Commit d201b5d

Browse files
authored
Update minimum-unique-word-abbreviation.py
1 parent 45ab8a9 commit d201b5d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Python/minimum-unique-word-abbreviation.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Time: O(n * 2^n)
2-
# Space: O(n)
1+
# Time: O((d + n) * 2^n)
2+
# Space: O(d)
33

44
# optimized from Solution2
55
class Solution(object):
@@ -53,8 +53,8 @@ def bits_to_abbr(targets, bits):
5353
return bits_to_abbr(target, result)
5454

5555

56-
# Time: O(n * 2^n)
57-
# Space: O(n)
56+
# Time: O((d + n) * 2^n)
57+
# Space: O(d + n)
5858
class Solution2(object):
5959
def minAbbreviation(self, target, dictionary):
6060
"""

0 commit comments

Comments
 (0)