[LeetCode] Sliding Window and Double Pointer 科學刷題

1. 定長滑動窗口 定長滑動窗口 pattern 1.1 基礎 1456. Maximum Number of Vowels in a Substring of Given Length(1263) 643. Maximum Average Subarray I 1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold(1317) 2090. K Radius Subarray Averages(1358) 2379. Minimum Recolors to Get K Consecutive Black Blocks(1360) 1052. Grumpy Bookstore Owner(1418) 1461. Check If a String Contains All Binary Codes of Size K(1504) 2841. Maximum Sum of Almost Unique Subarray(1546) 2461. Maximum Sum of Distinct Subarrays With Length K(1553) 1423. Maximum Points You Can Obtain from Cards(1574) 1652. Defuse the Bomb 1297. Maximum Number of Occurrences of a Substring(1748) 1176. Diet Plan Performance(會員題) 1100. Find K-Length Substrings With No Repeated Characters(會員題) 1852. Distinct Numbers in Each Subarray(會員題) 1151. Minimum Swaps to Group All 1’s Together(會員題) 2107. Number of Unique Flavors After sharing K Candies(會員題) 1.2 進階 2134. Minimum Swaps to Group All 1’s Together II(1748) 2653. Sliding Subarray Beauty(1786) 1888. Minimum Number of Flips to Make the Binary String Alternating(2006) 567. Permutation in String 438. Find All Anagrams in a String 30. Substring with Concatenation of All Words 2156. Find Substring With Given Hash Value(2063) 2953. Count Complete Substrings(2449) 1016. Binary String With Substrings Representing 1 To N 683. K Empty Slots(會員題) 2067. Number of Equal Count Substrings(會員題) 2524. Maximum Frequency Score of a substring(會員題) 1.3 其它 2269. Find the K-Beauty of a Number(1280) 1984. Minimum Difference Between Highest and Lowest of K Scores(1306) 220. Contains Duplicate III 2. 不定長滑動窗口 不定長滑動窗口主要分為三類:求最長子數組、求最短子數組,以及求子數組個數。 ...

October 25, 2022 · 3 分鐘 · Rain Hu