šŸŽ¢ ELI5 Park / LeetCode / Sliding Window

šŸ” Sliding Window

The "Moving Magnifying Glass" Chapter

Like looking through a moving magnifying glass! A window slides across the array, growing and shrinking as needed. Perfect for "subarray" problems!

Easy

Best Time to Buy/Sell Stock

Max profit with one transaction!

→
Medium

Longest Substring Without Repeating

Longest unique character substring!

→
Medium

Minimum Window Substring

Smallest window containing all chars!

→

šŸŽÆ Brain Hack

Expand, then shrink! Add elements to right, update window info. When condition violated, shrink from left. O(n) instead of O(n²)!