Glossary

Algorithm (sliding window approach):

Maintain a window [left, right] - Use a set to track characters in current window - Expand right pointer: if character not in set, add it - If character already in set, shrink from left until it's removed - Track maximum window size throughout

Learn More

Related Terms