What is Algorithm?
A step-by-step procedure for solving a problem or performing a computation, defined as a finite sequence of instructions.
Algorithms are the foundation of computer science. They define how to solve problems efficiently. Key properties include correctness (produces right output), efficiency (time and space complexity), and finiteness (terminates).
Common algorithm types include sorting (quicksort, mergesort), searching (binary search), graph algorithms (Dijkstra, BFS/DFS), dynamic programming, and greedy algorithms. Algorithm efficiency is measured using Big O notation.