Category: Coding Interview
-
Binary Search Variants: 6 LeetCode Problems Benchmarked
Three binary search patterns tested on 6 LeetCode problems. Same O(log n), wildly different bug counts. Here's which one survives interview pressure.
-
HashMap Tricks: 4 Interview Problems Where Dict Beats Array
Master HashMap techniques to solve frequency counting, two-sum, anagram grouping, and subarray sum problems faster than array-based approaches
-
Off-by-One Errors in Binary Search: 5 Common Bugs
Fix 5 critical off-by-one bugs in binary search that cause infinite loops and wrong results. Learn boundary checks that actually work.
-
Deque vs List for BFS: 6x Speed Difference at Scale
Compare deque vs list for BFS performance and discover why the wrong choice causes 6x slowdowns at scale. Benchmark data reveals the winner.
-
Quick Sort Pivot Selection: First vs Random vs Median Benchmarked
Quick Sort pivot strategies benchmarked: first vs random vs median-of-three. Which wins for speed? Real test results reveal the surprising truth.
-
Recursive DFS vs Iterative Stack: Cycle Detection Performance and Limits
Recursive DFS is 30% faster but crashes at 10K nodes. Iterative survives 50K graphs — here's the stack overhead breakdown and when each wins.
-
Sorting Algorithm Speed: 100 to 10K Elements Benchmark
At 1000 elements, Python's sorted() beats hand-written quicksort by 47x. Real benchmark data for interview-size arrays with the numbers behind why.
-
Quick Sort vs Merge Sort vs Heap Sort: Python Speed Test
Quick Sort beats Merge Sort by 40% on random arrays — but only with random pivots. Heap Sort is 2x slower despite identical O(n log n) complexity.