The O(n) Club2 Min Read dgtalbugonFebruary 28, 2025 The O(n) Club: Burst Balloons: When DP Pops and Padding Saves Your Sanity The O(n) Club: Burst Balloons—When DP Pops and Padding Saves Your Sanity ⚡ TL;DR Maximum coins by popping balloons—but if you think popping… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 28, 2025 The O(n) Club: Find-All-Duplicates—No HashMaps, No Regrets The O(n) Club: Find-All-Duplicates—No HashMaps, No Regrets ⚡ TL;DR Given an array stuffed with numbers from 1 to n, some appear once, some… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 27, 2025 The O(n) Club: Minimum Size Subarray Sum (How to Outsmart Prefix Sums on LeetCode 209) The O(n) Club: Minimum Size Subarray Sum (How to Outsmart Prefix Sums on LeetCode 209) ⚡ TL;DR Here’s the deal: given an array of… Discover More
The O(n) Club3 Min Read dgtalbugonFebruary 27, 2025 The O(n) Club: Kth Smallest Element in a BST (Without Losing Your Sanity) The O(n) Club: Kth Smallest Element in a BST (Without Losing Your Sanity) ⚡ TL;DR In a Binary Search Tree, just do an in-order traversal:… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 26, 2025 The O(n) Club: Remove Duplicates from Sorted Array—Why Is This Still an Interview Question? The O(n) Club: Remove Duplicates from Sorted Array—Why Is This Still an Interview Question? ⚡ TL;DR Your boss (or LeetCode, or that one smug… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 26, 2025 The O(n) Club: Populating Next Right Pointers With Minimal Drama The O(n) Club: Populating Next Right Pointers With Minimal Drama ⚡ TL;DR This classic LeetCode problem wants you to connect each tree node to… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 25, 2025 The O(n) Club: Rotated Array Minimum—Coffee-Powered Binary Search (Java Edition) The O(n) Club: Rotated Array Minimum—Coffee-Powered Binary Search (Java Edition) ⚡ TL;DR Looking for the smallest element in a rotated sorted… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 25, 2025 The O(n) Club: Search a 2D Matrix: Stop Nesting and Start Flattening The O(n) Club: Search a 2D Matrix: Stop Nesting and Start Flattening ⚡ TL;DR This sorted 2D matrix wants you to get clever, not just… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 24, 2025 The O(n) Club: Convert Sorted Array to BST – Arrays Deserve a Glow-Up Too The O(n) Club: Convert Sorted Array to BST – Arrays Deserve a Glow-Up Too ⚡ TL;DR You want a balanced BST from your nice, sorted array. The… Discover More
The O(n) Club2 Min Read dgtalbugonFebruary 24, 2025 The O(n) Club: Set Matrix Zeroes — A Griddy Matrix Meltdown The O(n) Club: Set Matrix Zeroes — A Griddy Matrix Meltdown ⚡ TL;DR Every zero in your grid? Nuke the whole row and column. The catch: Do it… Discover More