CS212 Exams
Spring 1999 - Prelim 1

Solution to Analysis of Algorithms

WARNING: You should seriously try to answer this question before looking at the solution -- it's just a good study skill. Also, some answers on this page may be more brief than you would want to put down in an actual exam. If you want any type of partial credit, you should write more than just the solution.


  1. O(n)
  2. O(i)
  3. T(0) = c
    T(m + 1) = T(m) + km
  4. T(n) = O(n2) for reverse

Question

Return to CS 212 Prelim 1 - Spring 1999