Use as much paper as you wish, but please label each question.
Please write legibly.
When you are asked to give example algorithms, use only named algorithms we have discussed in class.
[10 points] Describe the ADT tree. Include in your discussion:
Basic operations
Performance expectations
Possible implementations
[5 points] Give the binary search tree property. Give an example of a tree of height at least 3, that is a binary search tree.
[5 poitns] Describe the ADT binary search tree.
Performance expectations
Possible implementations
[5 points] Give an algorithm which will take an ordered array and insert the data into a BST with optimal height. (You might consider using a Queue to accomplish this.
[5 points] Give an algorithm that will take a BST and insert the data into an ordered array.
[5 points] Argue the performance and correctness of the previous algorithm.
[5 points] Describe AVL trees. What is the goal of an AVL tree? How does an AVL tree achieve this goal? What is the cost of achieving this goal?
[5 points] Describe what is happening in the following AVL rotation. Explain why this is happening, and how the AVL tree properties have been maintained.
[5 points] Given the following declaration, write the C++ code to perform the above rotation.
[5 points] Describe the technique of divide and conquer.
[5 points] Given an example of a divide and conquer algorithm.
[10 points] Compare and contrast linked lists and one dimensional array.
[5 points] Describe dynamic arrays. How are dynamic arrays different from arrays allocated at compile time? Describe the performance characteristics of dynamic arrays.
[10 points] Select any sorting algorithm.
Give the algorithm and name the sort.
Describe how the sort works.
Describe where the sort will work well and where it will not work well.
Describe the performance characteristics of the sort.
[10 points] Describe Big-O notation. What does it measure? What does it do well and what does it fail to do. What assumption is implicit when Big-O notation is asked for?