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 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 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
The O(n) Club2 Min Read dgtalbugonMay 3, 2025 The O(n) Club: Best Time to Buy and Sell Stock IV: The Art of Squeezing Profit From k Attempts The O(n) Club: Best Time to Buy and Sell Stock IV — The Art of Squeezing Profit From k Attempts ⚡ TL;DR You want max profit from stock prices,… Discover More
The O(n) Club2 Min Read dgtalbugonMay 3, 2025 The O(n) Club: Plus One Array Madness — Java’s Guide to Not Dropping the Carry The O(n) Club: Plus One Array Madness — Java’s Guide to Not Dropping the Carry ⚡ TL;DR Add 1 to an array of digits like a caffeinated… Discover More
The O(n) Club2 Min Read dgtalbugonMay 2, 2025 The O(n) Club: All Paths in a DAG (aka How Many Ways Can You Get Lost Without Ever Looping Back?) The O(n) Club: All Paths in a DAG (aka How Many Ways Can You Get Lost Without Ever Looping Back?) ⚡ TL;DR You’re handed a Directed… Discover More
The O(n) Club3 Min Read dgtalbugonMay 2, 2025 The O(n) Club: Binary Tree Preorder Traversal—How Not to Trip Over Your Roots The O(n) Club: Binary Tree Preorder Traversal—How Not to Trip Over Your Roots ⚡ TL;DR Preorder traversal means hitting every node in a binary… Discover More