The O(n) Club2 Min Read dgtalbugonFebruary 13, 2025 The O(n) Club: Partition Labels: Don’t Split Before the Party’s Over The O(n) Club: Partition Labels—Don’t Split Before the Party’s Over ⚡ TL;DR You want to split a string into as many parts as possible so that… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 13, 2025 The O(n) Club: Daily Temperatures: When Will It Be Warmer? (Stack, Don’t Sweat) The O(n) Club: Daily Temperatures—When Will It Be Warmer? (Stack, Don’t Sweat) ⚡ TL;DR Got a list of temperatures? For each day, you want to… Discover More
The O(n) Club3 Min Read dgtalbugonFebruary 12, 2025 The O(n) Club: Trie (Prefix Tree): Where Your Prefix Issues Go To Die The O(n) Club: Trie (Prefix Tree): Where Your Prefix Issues Go To Die ⚡ TL;DR Tries, aka prefix trees, are the go-to when you want to answer… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 12, 2025 The O(n) Club: Flatten Binary Tree to Linked List, Minus the Screaming The O(n) Club: Flatten Binary Tree to Linked List, Minus the Screaming ⚡ TL;DR Take your binary tree and wrestle it into a right-child-only… Discover More
The O(n) Club1 Min Read dgtalbugonFebruary 11, 2025 The O(n) Club: Search Insert Position — Now With 100% Less Linear Search Regret The O(n) Club: Search Insert Position — Now With 100% Less Linear Search Regret ⚡ TL;DR Why scan the whole list like you enjoy pain? Find… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 11, 2025 The O(n) Club: Reverse Integer Without Getting Fired The O(n) Club: Reverse Integer Without Getting Fired ⚡ TL;DR Flip the digits of a 32-bit signed integer using only math—string hacks get you… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 10, 2025 The O(n) Club: Edge-Walking Your Way Through 2D Matrix Search (No More Row-by-Row Regret) The O(n) Club: Edge-Walking Your Way Through 2D Matrix Search (No More Row-by-Row Regret) ⚡ TL;DR Don’t let a sorted 2D matrix make you… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 10, 2025 The O(n) Club: Minimum Path Sum: Grid Torture for People Who Hate Left Turns The O(n) Club: Minimum Path Sum – Grid Torture for People Who Hate Left Turns ⚡ TL;DR Start top-left, zigzag to bottom-right, counting up the… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 9, 2025 The O(n) Club: Stock Profiteering With Pac-Man Instincts The O(n) Club: Stock Profiteering With Pac-Man Instincts ⚡ TL;DR Every time your stock inches up, cash out the difference. Don’t stare… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 9, 2025 The O(n) Club: Longest Common Prefix for Devs Who Love Autocomplete More Than Typing The O(n) Club: Longest Common Prefix for Devs Who Love Autocomplete More Than Typing ⚡ TL;DR The mission: Find the longest prefix all strings… Discover More