Algorithms from zero
Arrays & strings: interview drill
You understand the patterns. Interviews test whether you can reach for them under a timer, cold, and explain the cost out loud.
Solve each problem before you reveal a hint, hit the target time, and narrate the time and space complexity as if an interviewer were listening. The hints exist for when you are genuinely stuck — they nudge you toward the pattern, never the full solution.
Six NeetCode-150 problems on the two patterns this unit teaches. Set a timer, solve each cold without looking at a hint, then say the time and space complexity out loud before you move on. Reveal a hint only when you are truly stuck — the hints nudge, they never hand you the answer.
0/6 solved
two pointers
Follow-up (aloud)
What changes if you must ignore only spaces but keep punctuation significant? Where does the skip condition live?
Follow-up (aloud)
Why is the two-pointer move provably correct here but unsound on an unsorted array? Tie it back to the invariant.
Follow-up (aloud)
Could you reach the target sum faster than O(n²)? What lower bound makes that hard for general 3-sum?
sliding window
Follow-up (aloud)
If you were allowed multiple buy/sell transactions, how does the greedy idea change?
Follow-up (aloud)
Why is the total work O(n) even though left can move many times — what amortizes it?
Follow-up (aloud)
Many solutions never shrink the window's max-frequency tracker. Why does the answer stay correct even when that count is stale?
Mark each problem solved once you finished it cold, inside the target time, and could state the complexity without hesitation. Come back in a few days and re-solve the ones you marked — spaced revisits are what turn a recognised pattern into a reflex.