Skip to content

Commit 0316ca1

Browse files
committed
Update longest-substring-with-at-most-two-distinct-characters.py
1 parent a4fd7a7 commit 0316ca1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Python/longest-substring-with-at-most-two-distinct-characters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Time: O(n^2)
1+
# Time: O(n)
22
# Space: O(1)
33
#
44
# Given a string, find the length of the longest substring T
@@ -29,4 +29,4 @@ def lengthOfLongestSubstringTwoDistinct(self, s):
2929
return longest
3030

3131
if __name__ == "__main__":
32-
print Solution().lengthOfLongestSubstringTwoDistinct("eceba")
32+
print Solution().lengthOfLongestSubstringTwoDistinct("eceba")

0 commit comments

Comments
 (0)