Presentation is loading. Please wait.

Presentation is loading. Please wait.

Review for Exam 1 Topics covered: –Asymptotic analysis –Lists and list implementations Stacks and queues –General trees, binary trees –BST For each of.

Similar presentations


Presentation on theme: "Review for Exam 1 Topics covered: –Asymptotic analysis –Lists and list implementations Stacks and queues –General trees, binary trees –BST For each of."— Presentation transcript:

1 Review for Exam 1 Topics covered: –Asymptotic analysis –Lists and list implementations Stacks and queues –General trees, binary trees –BST For each of these data structures –Basic idea of data structure and operations Be able to work out small example problems –Advantages and limitations –Asymptotic time performance of their operations –Comparison between different implementations

2 Asymptotic analysis –Best/Worst/Average performance (time and space) –Big-O notation and properties Definition (constants c and n 0 ) Lower order terms, constant coefficients Sum rule, product rule (be careful) Proofs –Growth rates of commonly used functions Constant/logarithm/polynomial/exponential L’Hospital’s rule –Amortized analysis Average behavior for a long sequence of operations

3 Lists –List ADT. –Basic operations and their time performance (implemen- tation dependent) –List iterators. –List implementation Array Linked list Stacks and queues –ADT and operations (and their time performance) –Implementation: Adaptor How this design pattern works Pros and cons

4 General tree –Definition –Internal and external nodes –Height and depth, path length –Tree storage methods and their nodes Binary trees –Binary tree ADT –Definitions of Full, complete and perfect binary trees and their properties –Recursive definition of binary tree leads to Recursive implementation of methods Induction proof for properties –4 different orders of tree traversals

5 BST –Definition –Basic operations and their implementations Find/contains, findMin, findMax insert, remove, recursive implementations –Time performance of these operations –BST iterators –Problems with unbalanced BST (degeneration)

6 Types of questions: Similar to those of the review questions on the class website (under Exams)Exams –Definitions –Short questions –Coding (some may require using operations already defined in the class, mostly in pseudo code) –Applying operations to specific example problems –Proofs


Download ppt "Review for Exam 1 Topics covered: –Asymptotic analysis –Lists and list implementations Stacks and queues –General trees, binary trees –BST For each of."

Similar presentations


Ads by Google