Engineer Atlas
DSA
Overview
Learn
Visualizer
Algorithm Finder
Patterns
Complexity
Roadmap
Practice
Interview
More
Overview
Learn
Visualizer
Algorithm Finder
Patterns
Complexity
Roadmap
Practice
Interview
Cheat Sheet
Compare
Search…
⌘K
Common Interview Mistakes
Each mistake: explanation → example → broken solution → corrected solution → practice.
Guide
Questions
Problems
Mock Interview
Assessments
Constraints
Quick-fire
Mistakes
Red Flags
Readiness
All
Problem understanding
Complexity
Binary search
Graphs
Dynamic programming
Recursion
Hashing
Sliding window
Problem understanding
Reading "subarray" as "subsequence" (or vice versa)
+
Problem understanding
Not asking whether duplicates are allowed
+
Problem understanding
Assuming the input is sorted when it is not
+
Problem understanding
Returning 0-indexed positions when 1-indexed were asked
+
Complexity
Writing O(n²) when the constraints demand O(n log n)
+
Complexity
Ignoring space complexity
+
Complexity
Hidden O(n) inside a loop (pop(0), string concatenation, `in` on a list)
+
Binary search
Off-by-one on the search bounds
+
Binary search
Wrong loop invariant when searching for a boundary
+
Binary search
Infinite loop from `lo = mid` with a floor midpoint
+
Binary search
Overflow in `(lo + hi) / 2` in fixed-width languages
+
Graphs
Forgetting the visited set
+
Graphs
Using DFS to find a shortest path
+
Graphs
Running Dijkstra on a graph with negative edges
+
Graphs
Not handling disconnected graphs
+
Dynamic programming
Choosing a state that does not capture the decision
+
Dynamic programming
Missing or wrong base case
+
Dynamic programming
Incorrect transition
+
Dynamic programming
Wrong iteration order (0/1 knapsack in a 1-D table)
+
Dynamic programming
Writing the recursion but forgetting to memoize
+
Recursion
Missing or unreachable termination condition
+
Recursion
Mutating shared state without undoing it in backtracking
+
Hashing
Using mutable objects as hash keys
+
Hashing
Relying on hash map iteration order
+
Sliding window
Sliding window on arrays with negative numbers
+
Sliding window
Never shrinking the window
+