algorithms
Efficient algorithms and search techniques
Plain-English guide to Big O notation and algorithm complexity. Learn common time complexities (O(1), O(log n), O(n), O(n^2)) and simple rules of thumb.
Discover the optimal sock pairing algorithm using in-place sorting like heapsort for O(n log n) time under log-space constraints. Compare with hashing, radix methods, and practical tips for 30 pairs. Relates to element distinctness.
Optimal algorithm for Letter Boxed word game: bitmask DP, BFS on (mask, last), admissible heuristics like set-cover bounds, pruning techniques for minimal words. Fast for L=12 puzzles with chaining and coverage.
Compute the exact expected total payoff at stopping time using finite-state Markov chain and dynamic programming. Includes minimal state space, recurrence equations, backward substitution, and Python code for precise fraction.