The O(n) Club2 Min Read dgtalbugonJuly 22, 2025 The O(n) Club: Increasing Order Search Tree: When Your BST Just Wants to Be a Queue The O(n) Club: Increasing Order Search Tree—When Your BST Just Wants to Be a Queue ⚡ TL;DR If your BST refuses to queue up nicely, tell it:… Discover More
The O(n) Club2 Min Read dgtalbugonJuly 22, 2025 The O(n) Club: Robot Bounded in Circle—How to Stop Your Robot From Moonwalking to Infinity The O(n) Club: Robot Bounded in Circle—How to Stop Your Robot From Moonwalking to Infinity ⚡ TL;DR Does your robot know when to stop, or is it… Discover More
The O(n) Club3 Min Read dgtalbugonJuly 21, 2025 The O(n) Club: Sliding Window Buckets and the Art of Almost-Duplicates (LeetCode 220) The O(n) Club: Sliding Window Buckets and the Art of Almost-Duplicates (LeetCode 220) ⚡ TL;DR Don’t want to wreck your runtime with… Discover More
The O(n) Club2 Min Read dgtalbugonJuly 21, 2025 The O(n) Club: Super Egg Drop — How to Crack It Without Losing All Your Eggs (or Dignity) The O(n) Club: Super Egg Drop — How to Crack It Without Losing All Your Eggs (or Dignity) ⚡ TL;DR Given k eggs and n floors, how few moves do… Discover More
The O(n) Club2 Min Read dgtalbugonJuly 20, 2025 The O(n) Club: Bitwise AND of Numbers Range — or, Why Naive Loops Cry The O(n) Club: Bitwise AND of Numbers Range — or, Why Naive Loops Cry ⚡ TL;DR Bitwise AND from left to right: all differing bits will be… Discover More
The O(n) Club3 Min Read dgtalbugonJuly 20, 2025 The O(n) Club: Shortest Bridge — When DFS and BFS Join Forces (and Regret It Immediately) The O(n) Club: Shortest Bridge — When DFS and BFS Join Forces (and Regret It Immediately) ⚡ TL;DR Connect two islands in a binary grid by… Discover More
The O(n) Club3 Min Read dgtalbugonJuly 19, 2025 The O(n) Club: Deepest Leaves Sum — BFS to the Rescue (Again) The O(n) Club: Deepest Leaves Sum — BFS to the Rescue (Again) ⚡ TL;DR Quick summary: Find every leaf node chilling at the bottom of the tree… Discover More
The O(n) Club2 Min Read dgtalbugonJuly 19, 2025 The O(n) Club: Pascal’s Triangle II, or How to Mutate Arrays Without Crying The O(n) Club: Pascal’s Triangle II, or How to Mutate Arrays Without Crying ⚡ TL;DR Pascals’s Triangle II: You want rowIndex-th row (0-based)… Discover More
The O(n) Club2 Min Read dgtalbugonJuly 18, 2025 The O(n) Club: Frog Jump: Can Your Recursion Swim, or Will It Croak? The O(n) Club: Frog Jump — Can Your Recursion Swim, or Will It Croak? ⚡ TL;DR Frog at stone 0 wants to land on the last stone, only jumping… Discover More
The O(n) Club2 Min Read dgtalbugonJuly 18, 2025 The O(n) Club: Maximum Difference Between Node and Ancestor: Not Your Parent’s Binary Tree Drama The O(n) Club: Maximum Difference Between Node and Ancestor ⚡ TL;DR If you want the maximum absolute difference between a node and any… Discover More