The O(n) Club2 Min Read dgtalbugonJanuary 21, 2025 The O(n) Club: Remove Nth Node From End—Don’t Lose Your Head (Literally) The O(n) Club: Remove Nth Node From End—Don’t Lose Your Head (Literally) ⚡ TL;DR Delete the nth node from the end of a singly linked list—no… Discover More
The O(n) Club1 Min Read dgtalbugonJanuary 21, 2025 The O(n) Club: Sort Colors (LeetCode 75): Dutch Flags, Java, and Pointer-Induced Existential Dread The O(n) Club: Sort Colors (LeetCode 75): Dutch Flags, Java, and Pointer-Induced Existential Dread ⚡ TL;DR Need to sort an array of 0s (red),… Discover More
The O(n) Club1 Min Read dgtalbugonJanuary 20, 2025 The O(n) Club: Next Permutation – Because Arrays Get Bored Too The O(n) Club: Next Permutation – Because Arrays Get Bored Too ⚡ TL;DR Given an array, your job is to rearrange it into the next… Discover More
The O(n) Club3 Min Read dgtalbugonJanuary 20, 2025 The O(n) Club: Symmetric Trees — Why Your Left Nodes Need Couples Therapy The O(n) Club: Symmetric Trees — Why Your Left Nodes Need Couples Therapy ⚡ TL;DR Ever wonder if your binary tree is as balanced and… Discover More
The O(n) Club3 Min Read dgtalbugonJanuary 19, 2025 The O(n) Club: Lowest Common Ancestor in a Binary Tree: Recursion So Easy, Even Your Ancestors Could Do It The O(n) Club: Lowest Common Ancestor in a Binary Tree: Recursion So Easy, Even Your Ancestors Could Do It ⚡ TL;DR Want the lowest common… Discover More
The O(n) Club2 Min Read dgtalbugonJanuary 19, 2025 The O(n) Club: Sliding Window Maximum: Enjoy O(N) Glory, Deque-Style! The O(n) Club: Sliding Window Maximum — Enjoy O(N) Glory, Deque-Style! ⚡ TL;DR If you’re still brute-forcing the max of every window, please… Discover More
The O(n) Club1 Min Read dgtalbugonJanuary 18, 2025 The O(n) Club: Validate Binary Search Tree—Stop Trusting the Children The O(n) Club: Validate Binary Search Tree—Stop Trusting the Children ⚡ TL;DR If you want to validate a Binary Search Tree (BST), don’t… Discover More
The O(n) Club3 Min Read dgtalbugonJanuary 18, 2025 The O(n) Club: Letter Combinations of a Phone Number — Texting Like It’s 2001 The O(n) Club: Letter Combinations of a Phone Number — Texting Like It’s 2001 ⚡ TL;DR Your job: take a string of digits (2-9). Pretend… Discover More
The O(n) Club2 Min Read dgtalbugonJanuary 17, 2025 The O(n) Club: Combination Sum — The Java Dev’s Guide to Backtracking Chaos The O(n) Club: Combination Sum — The Java Dev’s Guide to Backtracking Chaos ⚡ TL;DR Given a set of numbers, find every unique combo (as many… Discover More
The O(n) Club2 Min Read dgtalbugonJanuary 17, 2025 The O(n) Club: Permutations: All The Things! (LeetCode 46 & The Backtracking Dance) The O(n) Club: Permutations: All The Things! (LeetCode 46 & The Backtracking Dance) ⚡ TL;DR Take a bunch of distinct integers and churn… Discover More