Exam 3 Review Questions

Exam 3 Review Questions

<p>Exam 3 Review Questions Chapters 7, 8, 9*, and 10* (* selected sections) + Big-O </p><p>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?</p><p>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?</p><p>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</p><p>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</p><p>Binary search*</p><p>Recursive data structures - examples - a pattern for methods accessing/manipulating such ADTs o What is a wrapper method in this scenario?</p><p>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</p><p>Tree traversal - inorder, preorder, postorder - expression tree: pre-/in-/postfix representation of an expression*</p><p>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) </p><p>Heap - Recursive definition: smallest value in root of all subtrees - Representation: using a one-dimension array - Insertion / removal of an item</p><p>Tree set and tree map - similarities and differences - map entry - applications</p><p>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</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us