Skip to content

Commit 380ebdd

Browse files
committed
changed time compliexity analysis for encode and decode strings
1 parent 284f324 commit 380ebdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

encode-and-decode-strings/samthekorean.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Solution:
44
@return: encodes a list of strings to a single string.
55
"""
66

7-
# TC : O(n*m) where n is the length of strings in strs. m is the average length of the strings
7+
# TC : O(n) where n is the combined length of the string in the list of strings.
88
# SC : O(S), where S is the sum of the lengths of all strings in strs
99
def encode(self, strs):
1010
res = ""

0 commit comments

Comments
 (0)