The O(n) Club3 Min Read dgtalbugonApril 25, 2025 The O(n) Club: Reconstruct Itinerary (JFK Edition): When Your DFS Hits Turbulence The O(n) Club: Reconstruct Itinerary (JFK Edition): When Your DFS Hits Turbulence ⚡ TL;DR Given a suitcase full of flight tickets, your… Discover More
The O(n) Club2 Min Read dgtalbugonApril 25, 2025 The O(n) Club: Ugly Numbers II – Three Pointers, Zero Ugly Bugs The O(n) Club: Ugly Numbers II – Three Pointers, Zero Ugly Bugs ⚡ TL;DR Ugly numbers are those rare creatures with only 2, 3, or 5 as their… Discover More
The Mutex Club1 Min Read dgtalbugonApril 25, 2025 The Mutex Club: Thread Group + Mutex Logging Demystified TL;DR Thread Groups help you herd related threads like logging robots, but they don’t enforce order. A mutex is your log file’s bouncer—one… Discover More
The Mutex Club2 Min Read dgtalbugonApril 25, 2025 The Mutex Club: Lock-Free Atomic Counters with CAS 🚀 Forget refereeing thread arguments yourself — let CAS handle the quarreling. ## Key Insights # Atomic Variables and CAS in a Nutshell Wrap… Discover More
The O(n) Club2 Min Read dgtalbugonApril 24, 2025 The O(n) Club: Single Number II: That One Rogue Bit Nobody Likes The O(n) Club: Single Number II—That One Rogue Bit Nobody Likes ⚡ TL;DR Given an array where every number appears three times except one… Discover More
The O(n) Club2 Min Read dgtalbugonApril 24, 2025 The O(n) Club: Binary Tree Postorder Traversal—Why the Cleanup Crew Wins The O(n) Club: Binary Tree Postorder Traversal—Why the Cleanup Crew Wins ⚡ TL;DR You want to visit the left child, then the right child, then… Discover More
The Mutex Club1 Min Read dgtalbugonApril 24, 2025 The Mutex Club: Lock Ordering for Deadlock-Free Bank Transfers The Deadlock Dilemma Ever seen your payment processor come to a screeching halt? When two threads try to swap funds between accounts A and B… Discover More
The Mutex Club1 Min Read dgtalbugonApril 24, 2025 The Mutex Club: Futures, Timeouts, and Avoiding Thread Hell ⏱️ TL;DR: Timeout your Futures or face thread starvation, deadlocks, and cursed automations. ## Key Insights # Timeouts Aren’t Optional… Discover More
The O(n) Club2 Min Read dgtalbugonApril 23, 2025 The O(n) Club: Become the Overlord of Longest Repeating Character Replacements (Sliding Window Style) The O(n) Club: Become the Overlord of Longest Repeating Character Replacements (Sliding Window Style) ⚡ TL;DR Here’s the interview… Discover More
The O(n) Club2 Min Read dgtalbugonApril 23, 2025 The O(n) Club: Sort Characters By Frequency — and Stop Overengineering It The O(n) Club: Sort Characters By Frequency — and Stop Overengineering It ⚡ TL;DR Your job: shuffle the string so that characters with the… Discover More