Exam 3 Review Questions Chapters 7, 8, 9*, and 10* (* selected sections) + Big-O

2.8 Efficiency of Algorithms Measuring efficiency/complexity of algorithms by analyzing their runtime/memory space growth rates with respect to size growth of the dataset - What does Big-O notation mean? - Why using it? (I.e., why not using exact runtime measurements?) - What are the typical growth rates? And how to rank (or compare) them? - How to determine what Big-O notation to choose for a given algorithm?

Define/describe recursion - What is the nature of a recursive algorithm? - What is a base case? What is a recursive case? - Can all recursive algorithms terminate eventually? What is the criterion for a recursive method/function to stop?

Tracing recursive algorithms using action/execution frames - What need to be tracked in these frames? - Know how to use them to trace a given algorithm

Recursion vs. iteration - conversion between the two - What is tail recursion? What is recommended for methods that contain a tail recursion? - Efficiency of recursion: when to use and when not to use

Binary search*

Recursive data structures - examples - a pattern for methods accessing/manipulating such ADTs o What is a wrapper method in this scenario?

Tree concepts and terminologies - root/leaf/non-leaf nodes - parent, child(ren), sibling, ancestor, descendent - path, height, level - fullness, completeness, emptiness - general tree, binary tree, binary search tree, heap

Tree traversal - inorder, preorder, postorder - expression tree: pre-/in-/postfix representation of an expression*

Tree size and (min/max) tree height Binary search tree (as a recursive data structure) - recursive definition - BST operations o Search/retrieval o Insertion o Deletion (of a node with 0/1/2 child nodes)

Heap - Recursive definition: smallest value in root of all subtrees - Representation: using a one-dimension array - Insertion / removal of an item

Tree set and tree map - similarities and differences - map entry - applications

Insertion sort and quick sort - quadratic vs. nlogn performance - insertion sort: manually demonstrate how it works w/ a small dataset - quick sort: pivot and partition