Solution 1 HashMap Time complexity : O ( n ) . Index j will iterate n times. Space complexity O(min(m,n)). We need O(k) space for the sliding window, where k is the size of the Set. The size of the Set is upper bounded by the size of the string n and the size of …
Continue reading “Longest Substring Without Repeating Characters – Python 3 (Week 12 -09)”