The O(n) Club2 Min Read dgtalbugonJune 18, 2025 The O(n) Club: Range Sum Query – Mutable (Or Why Prefix Sums Need Therapy) The O(n) Club: Range Sum Query – Mutable (Or Why Prefix Sums Need Therapy) ⚡ TL;DR If you want fast range sums and in-place updates,… Discover More
The O(n) Club2 Min Read dgtalbugonJune 17, 2025 The O(n) Club: Unique Paths III and the Roomba That Never Misses a Spot The O(n) Club: Unique Paths III and the Roomba That Never Misses a Spot ⚡ TL;DR Pathfinding? Easy. Pathfinding without leaving a single square… Discover More
The O(n) Club3 Min Read dgtalbugonJune 17, 2025 The O(n) Club: Ones and Zeroes: Binary Knapsack and the Joy of Resource Regret The O(n) Club: Ones and Zeroes — Binary Knapsack and the Joy of Resource Regret ⚡ TL;DR Your mission: select the most binary strings possible… Discover More
The O(n) Club1 Min Read dgtalbugonJune 16, 2025 The O(n) Club: Arithmetic Slices: Why Your Loops Are Weeping (And How to Fix Them) The O(n) Club: Arithmetic Slices — Why Your Loops Are Weeping (And How to Fix Them) ⚡ TL;DR Count all contiguous subarrays (length 3+) where… Discover More
The O(n) Club2 Min Read dgtalbugonJune 16, 2025 The O(n) Club: Word Pattern—Where One-to-One Mapping Gets Real (and Painful) The O(n) Club: Word Pattern—Where One-to-One Mapping Gets Real (and Painful) ⚡ TL;DR Given a pattern like “abba” and a string like… Discover More
The O(n) Club2 Min Read dgtalbugonJune 15, 2025 The O(n) Club: Find Minimum in Rotated Sorted Array II: The Binary Search Headache That Won’t Quit The O(n) Club: Find Minimum in Rotated Sorted Array II – The Binary Search Headache That Won’t Quit ⚡ TL;DR Got a sorted array, spun… Discover More
The O(n) Club2 Min Read dgtalbugonJune 15, 2025 The O(n) Club: The Shortest Subarray with Sum at Least K (When Negatives Sabotage Everything) The O(n) Club: The Shortest Subarray with Sum at Least K (When Negatives Sabotage Everything) Discover More
The O(n) Club2 Min Read dgtalbugonJune 14, 2025 The O(n) Club: Delete Nodes and Return Forest – Chainsaw Edition The O(n) Club: Delete Nodes and Return Forest – Chainsaw Edition ⚡ TL;DR Delete designated nodes from your binary tree, then collect the roots… Discover More
The O(n) Club2 Min Read dgtalbugonJune 14, 2025 The O(n) Club: Reverse Bits—When Your Integers Stage a Flash Mob The O(n) Club: Reverse Bits—When Your Integers Stage a Flash Mob ⚡ TL;DR We’re flipping every bit in a 32-bit number. Take the far right bit,… Discover More
The O(n) Club2 Min Read dgtalbugonJune 13, 2025 The O(n) Club: Fibonacci Number: Attack of the Useless Recursion The O(n) Club: Fibonacci Number—Attack of the Useless Recursion ⚡ TL;DR If you’re asked for the nth Fibonacci number, please do not set your… Discover More