Posts
-
Ant Collisions on a Line: Who Reaches Whom?
-
The power of two
-
Five Classic Sorting Algorithms: Descriptions and Complexity
-
Three Classic Search Problems: Min/Max, Sparse Array, and Matrix Search
-
Fisher–Yates Shuffle and Reservoir Sampling
-
Sliding-Window Average in O(m) Time
-
Maximum Contiguous Subarray: Kadane’s Algorithm
-
Naive Recursive Fibonacci: Why It Explodes and How to Fix It
-
Remove Duplicates from a Sorted Array
-
Random Ants on a Stick: Expected Time Until All Fall Off
-
Order Statistics of Uniform(0,1): Max and Min
-
In-Place Variable Swap: No Temp Needed
-
Efficient Polynomial Evaluation with Horner’s Rule
-
Biased Gambler’s Ruin: Unequal Initial Fortunes
-
Dice Duel: Rolling a 12 Before Two Sevens in a Row