Browsing Category
Algorithm
171 posts
An algorithm is a step-by-step procedure for solving a problem or performing a task. Algorithms can be used in a variety of fields, including computer science, mathematics, and engineering.
Probabilistic Analysis and Randomized Algorithms: The Hiring Problem Explained
When I first came across the hiring problem, I realized it isn’t really about hiring at all —…
Proof of the Master Theorem: Divide-and-Conquer Recurrences Solved
I use the Master Theorem constantly whenever I need to figure out the running time of a divide-and-conquer…
The Master Method for Solving Recurrences: Divide-and-Conquer Approach
Whenever I write a divide-and-conquer algorithm and need to know its running time quickly, I reach for the…
The Substitution Method for Solving Recurrences: Divide-and-Conquer Approach
Before I ever reach for the Master Method, I think it’s worth understanding the substitution method, because it’s…
Strassen’s Algorithm for Matrix Multiplication: Divide-and-Conquer Approach
Matrix multiplication is one of those operations I use everywhere — graphics, machine learning, physics simulations, cryptography —…
Divide-and-Conquer Algorithm: The Maximum-Subarray Problem Solved
I first encountered the maximum-subarray problem framed around a stock trading scenario, and I think that framing is…
Growth of Functions, Asymptotic Notation, and Common Functions Explained
Before I can meaningfully compare two algorithms, I need a language for describing how their running time grows…
Insertion Sort Algorithm: Analysis, Design, and Implementation Guide
Insertion sort is usually the very first sorting algorithm I encounter when learning algorithms, and I still think…
The Role of Algorithms in Computing: Foundations and Importance
Whenever I try to explain what computer science actually is to someone outside the field, I always come…
Bottleneck Problem Algorithm: Working, Explanation, and Applications
Whenever I have a network — whether it’s roads, pipes, or computer links — I often care less…