什么是滑动窗口(Sliding Window) The Sliding Problem contains a sliding window which is a sub – list that runs over a Large Array which is an underlying collection of elements. 滑动窗口算法可以用以解决数组/字符串的子元素问题,它可以将嵌套的循环问题,转换为单循环问题,降低时间复杂度. 比如找最长的全为1的子数组长度.滑动窗口一般从第一个元…