The Gauntlet · Interview Prep

Python Coding Problems

Real-world multi-skill problems like you'll see in Python interviews. Each problem tests 4–8 concepts at once. Read, think, then reveal the solution.

Problems: 109
Categories: 10
Difficulty: ★★★☆☆ – ★★★★★
109Problems
10Categories
50+Skills Covered
∞Interview Value
How to use: Each problem is designed like a real interview question — it tests multiple Python skills at once. Read the problem carefully, think through your approach, then reveal the solution. Focus on understanding why the solution works, not just memorizing it.
Pick a Category
A
Log & File Parsing
Parse Apache logs, JSON-lines event streams, CSV audit trails. Filter, count, rank. The most common class of Python interview problem.
json.loads defaultdict urlparse csv.reader 10 problems
→
B
String & Text Processing
Anagram grouping, run-length encoding, email extraction, version sorting, word frequency. Pattern-match and transform text like a pro.
re.findall Counter itertools.groupby sorted + lambda 8 problems
→
C
Dict & Counting Patterns
Two Sum, first unique char, subarray sum with prefix counts, top-K frequent words. The hash-map-as-core-data-structure pattern.
Two Sum prefix sums Counter O(n) lookup 5 problems
→
D
List & Sequence Problems
Flatten nested lists, merge intervals, sliding window max, rotate list, product-except-self, minimum meeting rooms, longest consecutive sequence.
deque heapq slicing set 8 problems
→
E
Nested & JSON Data
Flatten nested dicts, deep merge, JSON diff, extract all values by key, safe nested get, CSV to nested JSON. Recursive thinking with real data shapes.
recursion isinstance dict.setdefault deep copy 7 problems
→
F
Data Structure Design
LRU Cache, Min Stack, Frequency Tracker, Rate Limiter, Session Builder, Trie, Task Scheduler. Design classes that work correctly and efficiently.
OrderedDict deque OOP topological sort 7 problems
→
G
Classic Algorithms
Binary search on answer, BFS maze, graph components, coin change DP, LIS with bisect, word ladder, K-closest points. The algorithm interview canon.
BFS / DFS dynamic programming binary search bisect 7 problems
→
H
Real-world & Pythonic
Requirements conflict detector, directory tree builder, arithmetic expression evaluator — problems that mirror real engineering tasks.
string parsing defaultdict tree stack operator precedence 3 problems
→
I
defaultdict Mastery
Every defaultdict pattern from basics to hard. int · list · set · lambda · nested. Predict outputs, spot gotchas, solve LeetCode with defaultdict. 27 problems covering every factory type and common interview pitfall.
defaultdict(int) defaultdict(list) nested lambda LeetCode × 5 25 problems
→
J
Live Company Questions
Real coding problems from actual interviews at Stripe, Anthropic, Datadog, Notion, Coinbase, Robinhood, DoorDash, Google, Samsara, Bloomberg, and more. Each question is confirmed or closely extrapolated from reported live screens.
Stripe Anthropic Datadog Bloomberg 15+ companies 29 problems
→
← The Gauntlet Python Under the Hood →