Algorithms are important

  • In the worst case scenario the early exit in a stupid program makes no difference, as the first result is the end of the loop
  • The maximum steps in Euclid’s algorithm = 5k (where k is the number of digits of the smallest number)
    • Worst case = I2 time (where I is the number of digits total in both numbers)
    • Number of digits squared = “almost constant time”