Final Exam Review Page

Exam Information

The exam will be on Wednesday, December 16 in lecture. It will be a conceptual exam (i.e. you will not be writing programs on a computer), although you may be asked to write pseudocode to demonstrate how an algorithm works. You cannot refer to any books, notes, programs, or other resources.

It will consist of:

Material to Review

The exam can cover anything discussed this semester. While there will be a focus on material not covered on the midterm, anything throughout the semester may show up. Review material has been available throughout the semester:

There will be a review session in class on Monday, December 14.

Questions about Exam

Content Questions about the Exam

The following questions come from the survey on CourseWeb.

  1. Fast Sorting Algorithms (43)
    1. Runtime (7)
      • Still shaky on runtimes.
      • Do not understand how to analysis the runtime exactly.
      • I still struggle with calculating runtimes of more complicated samples of code, so doing more examples would be very helpful to me
      • Calculating Runtimes the basics steps.
      • I am a bit shaky on the topics of runtimes for the fast sorting algorithms, and how to analyze them.  A brief review of the analysis of these fast sorting algorithms would be nice.
      • Runtimes
      • Algorithm Efficiency of Sorting Methods. (QuickSort, MergeSort, Shell Sort, etc) Please go over how to get the Big O(s)
    2. Description (4)
      • I find it difficult to visualize how each algorithm actually sorts their respective data.
      • Working through them is kind of hard, especially when they are recursive. WIth trees, lists, and queues, it's much easier to visualize the concept since you can draw them.
      • There are just a lot of different ways to sort, an overview with all of them listed next to each other and key facts about each would be very helpful.
      • for some how to implement or how to describe what's going on
    3. Differences/benefits (3)
      • I have the most trouble remembering which one does which and the benefits of each.
      • Hard to differentiate how each algorithm differs from the other
      • In particular, I would like to review why certain algorithms are better depending on what type of data is being used. I would just like an explanation on why one would be better than another.
  2. Priority Queues and Heaps (39)
    1. More Review (4)
      • We haven't spent much time on it, so I wouldn't feel confident answering a question on the topic. Spending time reviewing the basics would help me a lot.
      • I think because this material is the newest it would be helpful to go over it a little bit more
      • We didn't spend as much time on these so a little more review would be helpful.
      • What is a Heap? Is it an ADT?
    2. Implementation Details (4)
      • More code implementation examples
      • Implementation details
      • Implementation
      • I'm not sure I fully understand the functionality of a Heap and/or the implementation of the data structure.  I would like a review as to how Heaps are implemented and how they are used for data storage and manipulation.
    3. Runtime (2)
      • In lecture you said the run time of finding the highest priority item in a Q (array implementation) and then removing it is EXACTLY n - you had a diagram of one drawn, and showed that it takes k compare operations to find the highest priority item (assuming the highest priority item is at the kth position), and then n - k operations to shift the rest of the items over. How can you find the highest priority item in k compares? Even after you arrive at the highest priority (kth) item, don't you still have to check it agains the remaining (n-k) items in the Q, leaving you with an n + (n - k) exact runtime? Did I miss something about the ordering of this Q such that you wouldn't have to do the rest of the compares?
        • I think this is referring to when we talked about an unsorted array implementation of a priority queue. If that's the case, it would take exactly n operations to find the highest priority item (as you said). Then, it would take (n - k) operations to fill in the gap made by removing that item from the array (as you said). Therefore, it would take n + (n - k) = O(n) operations (as you said). I think you may have either missed the part where I said it was exactly n to find the max item or that it was O(n) for the whole operation. Or I happened to misspeak.
      • I would like to review how runtimes compare for different implementations of heaps. I would like to see a tree diagram vs. an array to review this topic.
  3. Material from the Midterm (28)
    1. Runtime & Big O (5)
      • BigO Notation - determining how different times are assigned to different functions
      • Algorithm Runtime, Big-O notation
      • Algorithm analysis, just finding the runtime of a method still gets confusing sometimes
      • Big Os
      • It's not that it's that difficult, but I haven't had to make use of the material recently so some of it is a bit fuzzy. Finding runtimes is sometimes difficult for more complex algorithms.
    2. Generics (2)
      • Generics in general still confuse me. When and when you can't use them and what you can't use them with.
      • I find bounded generics confusing. I'd like another overview of what they are in detail with examples.
    3. Recursion (1)
      • I still find recursion difficult. I would like the class to review how to analyze a problem/algorithm for its base case and also what are some simple ways to write the recursive case or think about the recursive case.
    4. ADTs (1)
      • I think that a review of Abstract Data Types would be very helpful to me
  4. Trees in general (24)
    1. General (5)
      • The add and remove functions with respect to keeping the trees balanced.
      • I found that the tree in general is confusing. 
      • Comparing the different types of trees and their runtimes
      • How to implement them
      • An overview of trees with just a little more emphasis on just the key aspects would be helpful.
    2. Traversals (2)
      • Mostly the traversals.  The major issue I have is that the buildInOrder (on the homework)  method confused me to the point where I am unsure and not confident about my knowledge pertaining to the Tree data structure. I would just like a review of the traversal methods and how to build a tree using the methods provided in the Java API.
      • I am confused with the runtime of traversals and other methods. Does it depend on the height of the tree and/or binary vs trinary?
    3. Iterators (2)
      • I find iterators and tree traversal difficult concept. I'd like to see what tree traversal could be used to do and how iterators simplify to process. I'd also like to see what are some other uses for iterators beside traversal.
      • Implementing an iterator
  5. Lists (10)
    1. Iterators
      • In the notes regarding the Linked List implementation of an iterator, when the list only has one item: "with a single node reference, remove() is not possible. Why?" Is this because the iterator would just not have anything to point to? Couldn't you just set it to null, as you set the firstNode of the list to null? Does the null implementation just not support null references?
        • No, it's because after you remove the node refered to by the iterator, you need to link up the list before that node to the list after that node. With just one reference in your iterator, you can't get the node before the one removed.
      • Iterators
      • Please go over list iterators in general
    2. General
      • Not entirely knowledgeable about their generality
      • In general.
  6. Binary Search Trees (9)
  7. Binary Trees (8)
  8. Queues (5)