Knowledge Card - Algorithm Efficiency
Algorithm Efficiency
-
Time Complexity: How long the algorithm takes to run.
- Example: Linear search vs. binary search.
-
Space Complexity: How much memory the algorithm uses.
- Example: Storing data in arrays vs. linked lists.
-
Big O Notation: A way to describe algorithm performance.
- Example: O(n) for linear search, O(log n) for binary search.