Download presentation
Presentation is loading. Please wait.
Published byRandall Davis Modified over 8 years ago
1
Final Exam Review CS 3358
2
150 Total Points – 20 Points Writing Programs – 65 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 Exam Format
3
Given the ADT for the Stack_3358 at the end of the exam, implement the push, pop, isEmpty and isFull functions. Example Programming Problem
4
What is the inorder traversal for the following BST? What would the following heap look like after inserting 42? What would this BST look like after deleting 42? Example Tracing Problems
5
What is the Big O time analysis of the insert operation in a doubly linked list when inserting before the cursor? Example Short Answer
6
?? 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 Review of 2308
7
30 points – Don’t 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 (log 2 n) – Look for loops How fast does the problem shrink? Analysis of Algorithms
8
20 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 List ADT
9
0 Points – Why? – Templated functions – Templated Classes – Understand the Stack Fun and Sort’em programs – Important, but not on exam Templates
10
0 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 Stack ADT
11
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 – Understand the Tree Search program Queue ADT
12
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
13
Sorting 10 Points – Algorithms Will not have to code the sorts Will likely have to draw or trace – Time and space considerations – O(n 2 ) sorts Selection sort Insertion sort – O(nlog 2 n) sorts Mergesort Quicksort
14
Hashing 20 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
15
Trees 40 Points – Definitions Terminology: path, depth, height, etc. – General Trees vs. Binary Trees – Tree Traversals Preorder Inorder Postorder – Binary Search Trees
16
Trees (cont.) Binary Search Tree – Find – Insert – Delete – Count Nodes Be able to code anything from BST_3358 Understand the Tree Search
17
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
18
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
19
HeapSort 0 Points – Basic Algorithm Transform array items into heap Get smallest item and reheap until heap is empty – Big O analysis
20
Not on this exam Code examples from the book – Only what we covered in class and on the programs
21
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. Don’t stay up late!! Get some sleep and eat a good breakfast. How to Study
22
Pencils and erasers We will provide scratch paper No calculators What to bring
23
Questions
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.