Exam 1 Review - Texas State University

Exam 1 Review - Texas State University

Final Exam Review CS 3358 Exam Format 175 Total Points 60 Points Writing Programs 50 Points Tracing Algorithms, determining results, and drawing pictures 50 Points Short Answer 15 Multiple Choice

Similar to quizzes and programming assignments Note: the point values are approximations Example Programming Problem Given the ADT for the Stack_3358 at the end of the exam, implement the push, pop, isEmpty and isFull functions. Example Tracing Problems What is the inorder traversal or the following

BST? What would the following heap look like after inserting 42? What would this BST look like after deleting 42? Example Short Answer What is the Big O time analysis of the insert operation in a doubly linked list when inserting before the cursor? Review of 2308

?? Points Multiple files Using header files Command line arguments OOP concepts. Especially those most useful for containers. Overloaded operators Copy constructors

Pointer variables Understand the Climate and Go Fish programs Obviously important concepts for the rest of the topics Analysis of Algorithms 30 points Dont memorize definition Does the amount of work depend on the size of the input? Should be able to rank as faster or slower

Be able to analyze algorithms and code and determine Big O time analysis Especially most common. O(1), O(n), O(n 2), O (log2n) Look for loops How fast does the problem shrink? Bag ADT 0 points Know how to use it Wont need to implement any of it

May need to do time analysis of a particular implementation Dont memorize any of the interface Understand the Go Fish program List ADT 10 Points Know the definition of the List ADT May have to implement

Array-based list Pointer-based linked list Array-based linked list Pointer-based doubly-linked list Array-based doubly-linked list

Be able to do the time analysis for any of the functions in the List ADT definition we used for the program Understand the List ADT program Templates 0 Points Why? Templated functions Templated Classes Understand the Stack Fun and Sortem programs

Important, but not on exam Stack ADT 10 points Understand basic functions Push

Pop IsEmpty isFull Should be able to implement array or linked list version of stack Be able to use a stack to solve a problem How does a stack relate to recursion? Understand Stack Fun assignment Queue ADT

10 Points Know the basic functions Enqueue Dequeue isFull isEmpty

Be able to implement circular array-based queue Be able to implement a linked list version of a queue Recursion 20 Points Understand Base case Smaller caller General case

Will have to write a recursive function Be able to do time analysis of a recursive function Understand math stuff, recursive flood fill, and especially binary search trees Sorting 20 Points Algorithms Will not have to code the sorts Will likely have to draw or trace

Time and space considerations O(n2) sorts Selection sort Insertion sort O(nlog2n) sorts Mergesort Quicksort Hashing 16 Points

Hash tables Hash Functions Using strings as keys Collisions Separate chaining Open Addressing Linear probing Quadratic probing Double Hashing

Be able to hash a list of keys given a function and collision strategy Trees 50 Points Definitions Terminology: path, depth, height, etc. General Trees vs. Binary Trees Tree Traversals Preorder

Inorder Postorder Binary Search Trees Trees (cont.) Binary Search Tree Find Insert Delete Count Nodes

Be able to code anything from BST_3358 Except the delete (but understand the algorithms) Heaps 15 Points Definitions Full binary tree Complete binary tree Array-based implementation of binary trees

Parent-child relationships Calculations to find nodes Heap property ReheapDown, ReheapUp Priority Queues 5 Points Can be implemented as a heap Know the algorithms enQueue

deQueue Be able to figure out Big O analysis of operations HeapSort 5 Points Basic Algorithm Transform array items into heap Get smallest item and reheap until heap is empty Big O analysis

Final Project 15 Points Be able to describe how you did various portions of the program. Opened list of files Parsed text Determined similarity between files Data structures you used Not on this exam

Code examples from the book Only what we covered in class and on the programs How to Study Review the programs. Rewrite them if you have time (especially the parts you had trouble with) Learn by doing and recognizing patterns. Use the exam for clues on the other problems

and for help with syntax. Dont stay up late!! Get some sleep and eat a good breakfast. What to bring Pencils and erasers We will provide scratch paper No calculators Questions

Recently Viewed Presentations

  • Changing Urban Environments - WordPress.com

    Changing Urban Environments - WordPress.com

    Changing Urban Environments. Rural urban migration and other factors cause cities to develop distinct areas. Bbc bitesize on the topic. Central business district is the main shopping and service area in a city. This is normally found in the middle...
  • Identifying Wi-Fi Interference by End-Users Richard Meng, Xiang

    Identifying Wi-Fi Interference by End-Users Richard Meng, Xiang

    Non-WiFi interference. Channel Contention. Neighboring . Channels . Is there a microwave oven nearby your laptop? Is there a Bluetooth device nearby your wireless router? References [1] DYSWIS, Collaborative network fault diagnosis, Kyung-Hwa Kim, Vishal Singh, Henning Shulzrinne. Microwave oven...
  • Слайд 1

    Слайд 1

    Present Perfect(для обозначения действий, которые начались в прошлом и продолжаются в настоящем). Timur Bekmambetov . has made . a number of films that . have had . enormous success in Russia and abroad. Alla Pugacheva . has been . a...
  • School Presentation

    School Presentation

    The children then begin their writing and are given regular opportunities to ensure their work is covering the regular VCOP. How do we start? We start with a stimulus, and this might be: A book (fiction or non-fiction) Poem ....
  • COMSATS Institute of Information Technology

    COMSATS Institute of Information Technology

    The attachment also shows the longer duration and more convexity on liabilities than assets. Attachment #2 shows what I picked in mortgage investments (only two bonds- the highest returns) and what I picked to fund them. The spread is about...
  • Annual General Meeting Thursday 8 September 2016 Welcome

    Annual General Meeting Thursday 8 September 2016 Welcome

    The CQC said we MUST: Ensure staff are able to attend and carry out mandatory training Ensure that all staff are effectively supported with formal supervision and appraisals Enable all staff to access appropriate developmental training opportunities as required Well-led...
  • SPOTS Aarti Sardana 3rd Yr Resident Dept of

    SPOTS Aarti Sardana 3rd Yr Resident Dept of

    REFLEX SYMPATHETIC DYSTROPHY Also known as causalgia, sudeck atrophy, algodystrophy, and shoulder-hand syndrome" Associated conditions include myocardial infarction, cerebrovascular accident, degenerative disease of cervical spine, disc herniation, trauma, and many others, Stiffness, pain, tenderness, weakness, swelling, and hyperesthesia ...
  • "What is a Temple?: A Preliminary Typology"

    "What is a Temple?: A Preliminary Typology"

    The tablets of destiny ("tablets of the decrees") are consulted both in the cosmic sense by the gods, and yearly in a special chamber, in the Eninnu temple of Gudea's time. Proposition 13. There is a close interrelationship between the...