1 Sliding window
Last updated
Was this helpful?
Last updated
Was this helpful?
比较犯贱的我,用了HashMap,其实可以用int[]或者boolean[].基本上都是O(n)。感觉sliding window求size,subarrays求sum/具体下标。
(L406)
-- Amazon
others that may relate to this topic :(偏2pointer,没模板)
(这题递归了,听说是nlogn)
-- 和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.
(简单玩法)