Set 04 - Hash Maps Deep Dive
Use Practice Loop if you need a reset.
Problems
| Problem | Difficulty | Pattern | Video |
|---|---|---|---|
| LC 128. Longest Consecutive Sequence | Medium | Hash Set | Video |
| LC 146. LRU Cache | Medium | Hash Map + DLL | Video |
| LC 380. Insert Delete GetRandom O(1) | Medium | Hash Map + Array | Video |
| LC 560. Subarray Sum Equals K | Medium | Prefix Sum + Map | Video |
Deliverables
- Write a 1-line invariant for each problem.
- Note 1 edge case or pitfall per problem.
- Record time-to-first-correct solution.
Notes
- LC 128: start only at sequence starts; expand with set lookups.
- LC 146: hashmap + doubly linked list for O(1) get/put.
- LC 380: array + hashmap; delete by swap-with-last.
- LC 560: prefix sum counts; add count[sum - k] each step.
Review
- Time spent + where you got stuck?
- Biggest mistake or missed edge case?
- One concrete improvement for next time.
Comments
Share your approach or ask questions
?
|
Markdown supported
Sign in to post
Loading comments...