Sliding window problems in Python
Answer questions about every run of consecutive items with the sliding window technique, on problems with tests.
Beginner
Intermediate
- 100. Longest Substring Without RepeatsThe longest stretch of text where nothing repeats80 XP15 min
- 109. Shortest Run Reaching a TargetHow short can a stretch be and still reach the target?85 XP15 min
- 113. Find All Anagram PositionsWhere do scrambled copies of a word hide in a text?90 XP18 min
- 326. Two Fruit BasketsOnly two baskets and a long row of fruit trees: how much can you pick?75 XP15 min
Advanced
Expert
- 189. Subarrays With Exactly K DistinctHow many stretches use exactly k different values?240 XP45 min
- 192. Smallest Window With All LettersThe shortest slice of text that holds every letter you need250 XP45 min
- 474. Every Word, Back to BackWhere in the text do all the words appear together, in any order?250 XP45 min
- 477. Shortest Stretch Worth at Least KUps and downs in one list: the shortest stretch that still adds up to k250 XP45 min
Other topics
- Python Basics
- Strings
- Lists
- Dictionaries and sets
- Loops
- Functions
- Math
- Sorting and searching
- Two pointers
- Stacks and queues
- Recursion and backtracking
- Dynamic programming
- Greedy
- Graphs
- Trees
- Bit manipulation
- Classes
- Iterators and generators
- Parsing
- Simulation
- Python idioms
- Regular expressions
- Codes and ciphers
- Working with data
- Grids and matrices
- Geometry
- Games and puzzles
- Heaps
- Data structures
Or see every challenge, with study plans, today's challenge and duels.