The O(n) Club2 Min Read dgtalbugonApril 22, 2025 The O(n) Club: Reverse String (LeetCode 344) for the Two-Pointer Skeptics The O(n) Club: Reverse String (LeetCode 344) for the Two-Pointer Skeptics ⚡ TL;DR Reverse a char array? Grab a pointer for each end, swap… Discover More
The Mutex Club2 Min Read dgtalbugonApril 22, 2025 The Mutex Club: Mastering Readers-Writers Locks for Peak Concurrency Key Insights # Concurrency with Constraints When you have multiple peepers and scribes vying for your precious data, you need a guard at the… Discover More
The Mutex Club2 Min Read dgtalbugonApril 22, 2025 ThreadPools: The Monica of Concurrent Programming (How to Clean Up Your Multithreading Mess Without Losing Your Mind) Let’s be honest: manually wrangling Java threads is a little like herding caffeinated squirrels. Enter the ThreadPool—your Monica Geller of… Discover More
The O(n) Club2 Min Read dgtalbugonApril 21, 2025 The O(n) Club: Find K Closest Elements and Avoid Interviewer Ambushes The O(n) Club: Find K Closest Elements and Avoid Interviewer Ambushes ⚡ TL;DR If you’re asked for k elements closest to x in a sorted array,… Discover More
The O(n) Club2 Min Read dgtalbugonApril 21, 2025 The O(n) Club: Contiguous Array: Find Your Zen Between 0s and 1s The O(n) Club: Contiguous Array—Find Your Zen Between 0s and 1s ⚡ TL;DR Want the longest streak where your array plays fair and tallies the… Discover More
The Mutex Club1 Min Read dgtalbugonApril 21, 2025 The Mutex Club: Why Your Singleton Needs a Bouncer in Multi-Threaded Code Key Insights – Classic Singleton uses a static instance and private constructor, perfect in single-threaded code but disastrous with… Discover More
The Mutex Club1 Min Read dgtalbugonApril 21, 2025 The Mutex Club: Taming the Producer-Consumer Problem TL;DR Coordinate your producers (chefs) and consumers (waiters) with a mutex for exclusive access and semaphores to signal full/empty slots,… Discover More
The O(n) Club2 Min Read dgtalbugonApril 20, 2025 The O(n) Club: Is Your Graph Bipartite, or Just Awkward? The O(n) Club: Is Your Graph Bipartite, or Just Awkward? ⚡ TL;DR Want to know if your graph can join the exclusive Bipartite Club? Try… Discover More
The O(n) Club2 Min Read dgtalbugonApril 20, 2025 The O(n) Club: Recovering a Corrupted BST: When Two Nodes Pull a Freaky Friday The O(n) Club: Recovering a Corrupted BST: When Two Nodes Pull a Freaky Friday ⚡ TL;DR If two nodes in a BST have swapped their values,… Discover More
The Mutex Club2 Min Read dgtalbugonApril 20, 2025 The Mutex Club: Key LRU Cache Insights for the AI Builder The Mutex Club: Key LRU Cache Insights for the AI Builder TL;DR LRU = hash map + doubly-linked list for O(1) lookups & recency updates.… Discover More