101 Best Time to Buy and Sell Stock Easy Kadane's Variant

Find the best day to buy and the best later day to sell a stock to maximize your profit.

O(n) time · O(1) space
102 Longest Substring Without Repeating Characters Medium Hash Set Window

Find the longest stretch of characters in a string where no character appears twice.

O(n) time · O(min(n, charset)) space
103 Longest Repeating Character Replacement Medium Frequency Window

You can change up to k letters in a string. Find the longest stretch you can make all the same character.

O(n) time · O(26) space
104 Permutation in String Medium Fixed Window

Check if any rearrangement of s1 appears as a contiguous chunk inside s2.

O(n) time · O(26) space
105 Minimum Window Substring Hard Shrinkable Window

Find the shortest piece of string s that contains every character from string t.

O(n + m) time · O(n + m) space
106 Sliding Window Maximum Hard Monotonic Deque

As a window of size k slides across the array, report the biggest number in each window position.

O(n) time · O(k) space