Goal: “Every expert was once a beginner.” — We’re picking up Python for real this week. Meanwhile, DSA shifts into hash maps and sorting — the bread and butter of coding interviews.
Topics
| Day | Track | Focus | Topics |
|---|---|---|---|
| Mon | A — DSA | Hash Maps & Prefix Sums | Hash Maps and Sets · Prefix Sum and Difference Arrays · Matrix Problems |
| Tue | B — Python | Data Types & Basics | Variables and Data Types · Mutable vs Immutable · Strings and String Methods |
| Wed | A — DSA | Sorting & Linear Structures | Sorting Algorithms · Linked Lists · Stacks · Monotonic Stack |
| Thu | B — Python | Collections & Comprehensions | Lists, Tuples, and Sets · Dictionaries · Comprehensions · Type Conversion and Truthiness |
| Fri | B — Python | Functions | Functions and Arguments · Lambda Functions · map, filter, reduce, zip |
Key Concepts
- Python mutability is crucial — lists are mutable, tuples and strings are not. This trips people up in interviews when they try to modify a string in-place.
- Hash maps are the backbone of 30%+ of interview problems. If we see “find a pair,” “count occurrences,” or “group by,” our first instinct should be reaching for a hash map.
- Prefix sums turn O(n) range queries into O(1) — a simple idea with huge payoff.
- Sorting algorithms — we don’t need to memorize all of them, but we should know merge sort (stable, O(n log n) guaranteed) and quick sort (average O(n log n), in-place).
- Monotonic stacks are a niche but powerful pattern for “next greater element” style problems.
Practice
- Solve 2 hash map problems (e.g., two sum, group anagrams)
- Implement merge sort from scratch in Python — this doubles as Python practice
- Write Python list comprehensions for 3 different transformations (filter + map, flatten 2D list, dict comprehension)
- Solve 1 monotonic stack problem (e.g., next greater element)
~17 topics · ~2 hrs/day · Dual-track: DSA arrays + Python fundamentals