Top-K Problems: Sorting vs Heaps vs Quickselect
The different approaches to finding the k smallest/largest elements in an array.
Teaching DS&A · research highlights · SWE thoughts · building in public
I'd love to tell you when I publish a new post.
Get notified when I write about DS&A or software engineering. Unsubscribe anytime if it's not your vibe.
The different approaches to finding the k smallest/largest elements in an array.
JS doesn't have built-in queues, which can be an issue if you have to implement a BFS. Here are the workarounds.
An optimal solution for a graph problem that comes up in the Wall Game.
A linear-time algorithm for a graph problem that comes up in the Wall Game.
How would you build a Lichess clone in 2025? My process for picking a tech stack.
The specs of the UI for the Wall Game and renders from frontend generators.
The backstory and thought process behind a fun paper from my PhD.
A binary search recipe that works for every problem, explained without code.
The exact prompts used to create an interactive 3D torus visualization app with vibe coding.
A problem walkthrough using the concepts from Beyond Cracking the Coding Interview.
A proof that heapify takes linear time without using complex equations.
Exploring the tradeoffs between lazy and eager implementations of common algorithms.
A comprehensive guide to different implementations of Dijkstra's algorithm, with code.
Many greedy algorithms can be modified to make local rather than global choices while still producing the same solutions.
A step-by-step guide to understanding and implementing dynamic programming algorithms with practical examples.
A guide to implementing preorder, inorder, and postorder tree traversals iteratively.