1 Sliding window
比较犯贱的我,用了HashMap,其实可以用int[]或者boolean[].基本上都是O(n)。感觉sliding window求size,subarrays求sum/具体下标。
438.Find All Anagrams in a String
159.Longest Substring with At Most Two Distinct Characters
340.Longest Substring with At Most K Distinct Characters
209 Minimum Size Subarray Sum (L406)
L604 Window Sum -- Amazon
713 Subarray Product Less Than K
1918 Kth Smallest Subarray Sum
others that may relate to this topic :(偏2pointer,没模板)
3.Longest Substring Without Repeating Characters
395.Longest Substring with At Least K Repeating Characters (这题递归了,听说是nlogn)
1658 Minimum Operations to Reduce X to Zero -- 和209有点像
LinkedIn面经: Shortest Word Distance II (variation) find 3 words
30 Substring with Concatenation of All Words - similar to 159, here treat words as char.
Last updated