Algorithms Foundations
Foundational algorithms and complexity tradeoffs.
All Articles (3 articles)
-
K-Crystal Balls Problem: Jump Search Pattern
Programming & Patterns / Algorithms Foundations 10 min readThe K-crystal balls (or K-egg drop) problem demonstrates how constrained resources fundamentally change optimal search strategy. With unlimited test resources, binary search achieves O(log n). With exactly k resources that are consumed on failure, the optimal worst-case complexity becomes O(n^(1/k))—a jump search pattern where each resource enables one level of hierarchical partitioning.
-
Sorting Algorithms: Complexity, Stability, and Use Cases
Programming & Patterns / Algorithms Foundations 25 min readA comprehensive guide to sorting algorithms covering fundamental concepts, implementation details, performance characteristics, and real-world applications. Learn when to use each algorithm and understand the engineering trade-offs behind production sorting implementations.
-
Search Algorithms: Linear, Binary, and Graph Traversal
Programming & Patterns / Algorithms Foundations 34 min readA comprehensive guide to search algorithms covering fundamental concepts, implementation details, performance characteristics, and real-world applications. Learn when to use each algorithm and understand the engineering trade-offs behind production search implementations.