Lecture #6 July 19 1995 Now its time to consider performance issues. Algorithm complexity is typically discussed in computer science using the big O notation. for example a search algorithm that needs to look for something sequentially in alist with n elements has a complexity of O(n) since it needs to pass through the list once. If binary search algorithm needs to only make log n checks to complete a search then its complexity is O(log n). Not all cases are so clear cut! You may wonder what happens if a search algorithm needed 2n+5 searches, what is its complexity, you may be surprise to find that the complexity of the algorithm is O(n); Constant multipliers or additions don't get counted when determining complexity. Also, with cases where say the number of iterations is determined to be n^2+n, the complexity is just n^2. Why is that, you might ask? It simply has to do with the magnitude of n^2. Here as an example, when n is 10,000, n^2 is 100,000,000, n loses significance when compared to n^2. ============================================================================ Lets talk about classification in C++. There are often times when it is useful to have interchangeable parts in a program. That is of C++ classes allow us to do. Lets consider a class for lists. The class int_list is considered to be a virtual class as it does not have a private section and no code for its functions. This is so that we can define subclasses of it that have private sections and code but follow the rules set by this class.