The O(n) Club1 Min Read dgtalbugonMay 6, 2025 The O(n) Club: Implement strStr and Dodge That Haystack Hangover The O(n) Club: Implement strStr and Dodge That Haystack Hangover ⚡ TL;DR You want to find the first spot where ‘needle’ appears in… Discover More
The O(n) Club3 Min Read dgtalbugonMay 6, 2025 The O(n) Club: Capacity to Ship Packages Within D Days — Goldilocks Goes Binary The O(n) Club: Capacity to Ship Packages Within D Days — Goldilocks Goes Binary ⚡ TL;DR Given a lineup of stubbornly ordered packages and a… Discover More
The Mutex Club2 Min Read dgtalbugonMay 6, 2025 The Mutex Club: Solving Priority Inversion in Task Scheduling Key Insights # What Is Priority Inversion? Priority inversion happens when a low-priority task grabs a resource (like a mutex), a… Discover More
The Mutex Club1 Min Read dgtalbugonMay 6, 2025 The Mutex Club: When Threads Just Dance in Circles Understanding Livelock in Messaging Queues\n\n### The Hallway Tango\nEver seen two people try to pass each other and end up stepping aside… Discover More
The O(n) Club1 Min Read dgtalbugonMay 5, 2025 The O(n) Club: Maximum Length of Repeated Subarray: Why Subsequence Logic Will Betray You The O(n) Club: Maximum Length of Repeated Subarray — Why Subsequence Logic Will Betray You ⚡ TL;DR Want the length of the longest common chunk… Discover More
The O(n) Club2 Min Read dgtalbugonMay 5, 2025 The O(n) Club: Backspace String Compare, or: Why Your Undo Key Hates You The O(n) Club: Backspace String Compare, or: Why Your Undo Key Hates You ⚡ TL;DR You have two strings, both infected with more ‘#’… Discover More
The Mutex Club1 Min Read dgtalbugonMay 5, 2025 The Mutex Club: Why Daemon Threads Are Your Silent Debugging Nightmare TL;DR: The Daemon Thread Trap Daemon threads in Python (and similar runtimes) run in the background but don’t block your process from exiting.… Discover More
The Mutex Club2 Min Read dgtalbugonMay 5, 2025 The Mutex Club: Why Monitors Trump Mutexes for Cleaner Concurrency Imagine juggling threads with just a mutex—it’s like tap-dancing blindfolded. Monitors not only lock resources but also coordinate threads… Discover More
The O(n) Club3 Min Read dgtalbugonMay 4, 2025 The O(n) Club: Trim a Binary Search Tree—Because Even BSTs Need Spring Cleaning The O(n) Club: Trim a Binary Search Tree—Because Even BSTs Need Spring Cleaning ⚡ TL;DR You’ve got a BST and strict instructions: keep only… Discover More
The O(n) Club2 Min Read dgtalbugonMay 4, 2025 The O(n) Club: Increasing Triplet Subsequence—When Two Bouncers Are All You Need The O(n) Club: Increasing Triplet Subsequence—When Two Bouncers Are All You Need ⚡ TL;DR You want to know if there’s an increasing subsequence… Discover More