Skip to content

Study Plan & Cheat Sheet

Master these array methods in order. They dominate interviews:

  1. map — Transform every element in an array
  2. filter — Select elements that pass a condition
  3. reduce — Accumulate values into any result
  4. splice vs slice — Very common interview question (mutating vs non-mutating)
  5. sort with comparator — Custom sorting logic
  6. find vs filter — Single result vs all matches
  7. some vs every — Short-circuit boolean checks

MethodReturnsUse Case
map()New arrayTransform each element
filter()New arraySelect matching elements
reduce()Single valueAggregate data
slice()New arrayExtract a portion (shallow copy)
concat()New arrayMerge arrays
includes()BooleanCheck if value exists
find()ElementGet first match
findIndex()NumberGet index of first match
some()BooleanAny element passes?
every()BooleanAll elements pass?
flat()New arrayFlatten nested arrays
flatMap()New arrayMap then flatten

Mutating Methods (⚠️ Changes Original)

Section titled “Mutating Methods (⚠️ Changes Original)”
MethodEffect
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).


After mastering arrays + hash maps + two pointers, study in this order:

  1. Linked Lists — Pointer manipulation, fast & slow technique
  2. Trees — BFS/DFS traversals, BST operations, recursion
  3. Graphs — Adjacency lists, connected components, shortest paths
  1. Recursion & Backtracking — Subsets, permutations, combinations
  2. Sliding Window — Subarray/substring problems (fixed & variable size)
  3. Dynamic Programming — Memoization, tabulation, classic patterns

DayFocusPractice
MonArrays + Methods2–3 easy problems
TueHash Maps + Sets2 medium problems
WedTwo Pointers2 medium problems
ThuSliding Window2 medium problems
FriRecursion / Backtracking2 problems
SatReview + Mock Interview4–5 problems from the week
SunRest / New Topic Exploration—

  • 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

Related: Array Methods → | Pro Tips → | Recursion Section →