<aside> 📌 Key Points:

<aside> 🎯 Sliding Window 题型 & 模版:

Overall,
// step1: 需要什么data structure?
	repeating => HashMap<Character, count>   //frequency map
	distinct => matched && HashMap<Character, count> 
	subarray sum => curSum || HashMap<prefixSum, index>

// step 2: 两个指针同向而行,search all possibile solutions
slow = 0
for (fast = 0; fast < n; fast++) {
	// step 3: 先加fast去考虑这个新的值怎么去影响当前的sliding window
	add fast
	
	// step 4: 查看当前值满足sliding window条件?需要移动slow去收缩window space?
	while (meeting sliding window condition) {
		// step 5: update res when window meets its criteria
		update res
		remove slow
		slow++
	}
}
return res if found

<aside> ✍️ 易错点:

<aside> 🌵 Table of Contents

</aside>


Maximum/Minimum Average/Sum/Product/Count

Date: July 7, 2023

Problem: Maximum Average Subarray I (Fixed Size Sliding Window)


Date: July 7, 2023

Problem: Maximum Average Subarray II (巧妙 - Binary Search w/o Sort)


Date: July 7, 2023

Problem: Maximum Size Subarray Sum Equals to K (PrefixSum + HashMap)



Date: July 7, 2023

Problem: Minimum Size Subarray Sum (Greater than or Equal to K) Non-fixed Size Sliding Window