Review for Exam 1 Topics covered Asymptotic analysis

  • Slides: 6
Download presentation
Review for Exam 1 • Topics covered: – Asymptotic analysis – Lists and list

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

 • Asymptotic analysis – Best/Worst/Average performance (time and space) – Big-O notation and

• 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

 • Lists – List ADT. – Basic operations and their time performance (implementation

• Lists – List ADT. – Basic operations and their time performance (implementation 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

 • General tree – – Definition Internal and external nodes Height and depth,

• General tree – – Definition Internal and external nodes Height and depth, path length Tree storage methods and their nodes • Binary trees – Full, complete and perfect binary trees and their properties – 4 different orders of tree traversals

 • BST – Definition – Basic operations and their implementations • • •

• BST – Definition – Basic operations and their implementations • • • Find/contains, find. Min, find. Max insert, remove, recursive implementations – Time performance of these operations – Problems with unbalanced BST (degeneration)

 • Types of questions: Similar to those of the supplementary questions on the

• Types of questions: Similar to those of the supplementary questions on the web (under Practice Exercises) – 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