Knowledge Card - Algorithm Efficiency

Algorithm Efficiency

  1. Time Complexity: How long the algorithm takes to run.

    • Example: Linear search vs. binary search.
  2. Space Complexity: How much memory the algorithm uses.

    • Example: Storing data in arrays vs. linked lists.
  3. Big O Notation: A way to describe algorithm performance.

    • Example: O(n) for linear search, O(log n) for binary search.