Snow пре 8 година
родитељ
комит
8ebf3fcca3
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      arrays-and-strings/longest_substring.py

+ 4 - 0
arrays-and-strings/longest_substring.py

@@ -1,4 +1,8 @@
 # Given a string, find the length of the longest substring without repeating characters.
+# Time complexity: worst O(n^2), best O(n). Using hash table to check unique
+# reduces to always O(n^2)
+# Space complexity: O(n/2)
+
 import pytest
 
 def test_longest_substring():