Study Plan & Cheat Sheet
Study Plan & Cheat Sheet
Section titled “Study Plan & Cheat Sheet”Priority List — If You Must Prioritize
Section titled “Priority List — If You Must Prioritize”Master these array methods in order. They dominate interviews:
- map — Transform every element in an array
- filter — Select elements that pass a condition
- reduce — Accumulate values into any result
- splice vs slice — Very common interview question (mutating vs non-mutating)
- sort with comparator — Custom sorting logic
- find vs filter — Single result vs all matches
- some vs every — Short-circuit boolean checks
Quick Reference — Array Methods
Section titled “Quick Reference — Array Methods”Non-Mutating Methods (Return New Value)
Section titled “Non-Mutating Methods (Return New Value)”| Method | Returns | Use Case |
|---|---|---|
map() | New array | Transform each element |
filter() | New array | Select matching elements |
reduce() | Single value | Aggregate data |
slice() | New array | Extract a portion (shallow copy) |
concat() | New array | Merge arrays |
includes() | Boolean | Check if value exists |
find() | Element | Get first match |
findIndex() | Number | Get index of first match |
some() | Boolean | Any element passes? |
every() | Boolean | All elements pass? |
flat() | New array | Flatten nested arrays |
flatMap() | New array | Map then flatten |
Mutating Methods (⚠️ Changes Original)
Section titled “Mutating Methods (⚠️ Changes Original)”| Method | Effect |
|---|---|
push() | Add to end |
pop() | Remove from end |
shift() | Remove from start |
unshift() | Add to start |
splice() | Add/remove at index |
reverse() | Reverse order |
sort() | Sort in place |
⚠️ Important:
sort()converts elements to strings by default — always provide a comparator:arr.sort((a, b) => a - b).
Learning Path — Recommended Next Topics
Section titled “Learning Path — Recommended Next Topics”After mastering arrays + hash maps + two pointers, study in this order:
Phase 1: Core Data Structures
Section titled “Phase 1: Core Data Structures”- Linked Lists — Pointer manipulation, fast & slow technique
- Trees — BFS/DFS traversals, BST operations, recursion
- Graphs — Adjacency lists, connected components, shortest paths
Phase 2: Advanced Techniques
Section titled “Phase 2: Advanced Techniques”- Recursion & Backtracking — Subsets, permutations, combinations
- Sliding Window — Subarray/substring problems (fixed & variable size)
- Dynamic Programming — Memoization, tabulation, classic patterns
Weekly Study Schedule
Section titled “Weekly Study Schedule”| Day | Focus | Practice |
|---|---|---|
| Mon | Arrays + Methods | 2–3 easy problems |
| Tue | Hash Maps + Sets | 2 medium problems |
| Wed | Two Pointers | 2 medium problems |
| Thu | Sliding Window | 2 medium problems |
| Fri | Recursion / Backtracking | 2 problems |
| Sat | Review + Mock Interview | 4–5 problems from the week |
| Sun | Rest / New Topic Exploration | — |
Before the Interview — Quick Checklist
Section titled “Before the Interview — Quick Checklist”- Review Map vs Set usage (frequency counter vs membership)
- Know mutating vs non-mutating methods by heart
- Practice Two Sum in 3 different ways
- Review time & space complexity for all patterns
- Prepare questions for the interviewer (system design, team culture)
- Talk through your solution before writing code