Blog, page 4
Plain answers about algorithms, interviews and performance.
Posts
Why your recursive solution works but you cannot explain it
Most developers can write a recursive function that passes tests. Far fewer can trace the call stack, name the invariant each frame maintains, or explain why the base case is sufficient. That gap between working code and understood code is where interviews and production incidents live.
DSA study plans that actually work
How long does it take to learn data structures and algorithms? Six to twelve weeks, if the plan matches your deadline. Here are the three study plans behind AlgoMastery's pathways, laid out week by week, and the reasons most self-study plans quietly fail.
Why arrays beat linked lists in practice
Arrays beat linked lists in most real code, and the reason is the memory hierarchy, not Big-O. Here is the cache-locality argument, an honest benchmark sketch, and the short list of cases where a linked list still earns its pointers.
The Hidden Cost of Premature Abstraction
In algorithm design and in engineering generally, the most expensive bugs are not the ones we make, they are the abstractions we built before we understood the problem. This essay is about why most interview-grade solutions stop at the right level of abstraction, and why production code so often doesn't.
The texts that taught me algorithms
A slow reading list: four books that did the heavy lifting when I was learning. What each does best, what each is bad at, and why their strengths don't overlap as much as a glance at their tables of contents suggests.
Recognise the shape, not the problem
Interview problems reuse a small catalogue of shapes. The candidate who memorises two hundred problems is running a losing race against the candidate who can classify a new problem in twenty seconds. The difference between them is pattern recognition, a skill that turns out to be learnable.
Complexity is a contract, not a fact
"O(n)" is not a measurement. It's a contract: a promise about how running time scales given certain assumptions. When those assumptions fail, the contract is void, and fast algorithms become slow ones. This essay names the three assumptions that most often quietly fail in production.