Loading...
Loading...
High-signal articles on system design, algorithms, career strategy, and engineering craft. Written by engineers who've been there.
Learn how to solve Random Pick with Weight using prefix sums and binary search — plus exactly what interviewers expect and the mistakes that tank candidates.
Master the 3Sum problem with Sort + Two Pointers, avoid the duplicate-skipping traps that trip up most candidates, and learn the pattern that unlocks a whole class of interview questions.
Learn how to solve the rotated sorted array problem in O(log n) — including what interviewers really look for, common mistakes that cost candidates the offer, and exactly how to talk through it.
Learn how to crack the Next Permutation problem in interviews — from building the right intuition to avoiding the exact mistakes most candidates make under pressure.
Most candidates overthink this problem and fall into classic binary search traps. Here's the clean lower_bound/upper_bound approach that interviewers love.