ITEC324

Study Guideline of the Final Exam

The final exam is a comprehensive exam. Thus, you must check the study guidelines of the midterm exam as well as the following items.

 

Patterns

*      Concept

*      For each of 5 patterns in Chapter 5:

ü  Intent

ü  Context and Solution

ü  Diagram

ü  Examples

 

Inheritance and Abstract Class

*      How to write a program using:

o   Adapter Class

o   Abstract Class

 

Multithreading

*      Multithread Programming

*      Thread Synchronization

o   Race Condition

o   Deadlock

 

Recursion

*      Describe the performance penalties incurred by using recursion and why they occur

*      Describe and illustrate the stack model of execution of recursive routines

*      Give an argument that a recursive routine is correct

*      Write simple recursive routines (including mathematical routines and list routines)

*      Describe the value of recursive routines

*      Contrast the power of recursive routines with non recursive code wrt speed, ease of programming, and what can be programmed recursively vs non-recursively

 

Binary Search

*      Know the advantages and limitations of binary search

*      Explain why the performance of binary searching is O(log n)

*      Be able to write a binary search routine, recursively and non-recursively

 

Sorting

*      Merge Sort

    • Hand execute and describe the operation of quick sort
    • Write the routines, recursive as appropriate, to perform merge and merge sort
    • Explain why the performance of mergesort routine is O(n * log n)
    • State the best/worst case performance of  mergesort and explain why each is what it is

*      Quick Sort

§  Hand execute and describe the operation of quick sort

§  Write the routines, recursive as appropriate, to perform partition and quick sort

§  Explain why the performance of quicksort is O(n * log n)

§  Explain when the performance of quicksort is degenerated to O(n2) and prove it.

*      Shell Sort

§  Hand execute and describe the operation of shell sort

§  Discuss the performance of shell sort.

*      Radix sort

§  Hand execute and describe the operation of radix sort

§  Give the performance of radix sort

 

Performance (Time Complexity)

*      Understand the summary table of sorting algorithms

    • State the worst case performance of common sorting algorithms: bubble, insertion, selection
    • State best/worst case performance of merge, quick, and radix sort
    • Give basic operation(s) of each sorts

Binary Trees

  1. Define a Binary Search Tree.
  2. Execute the following operation in a binary search tree.
    1. add a node
    2. delete a node with no child
    3. delete a node with one child
    4. delete a node with two children

Heaps

1.    Define and recognize a heap, represented either in array or tree

2.    Write a source code of trickleUp method and trickledown method using an array data.

3.    Simulate removing largest (smallest) element from a heap

4.    Simulate creating a heap from an array, showing tree transformation

5.    Simulate inserting into heap

6.    heapsort

§  simulate in 1 or 2 arrays

§  state and explain performance

§  describe relation to selection sort

7.    Code for insert, remove, trickle up/down, reheapify, heapsort

Hash tables

1.    Operations: list and simulate insert, search (successful and unsuccessful), delete

2.    State and explain average case performance of operations under uniform hashing assumption

3.    Explain motivation for hash tables and contrast their performance with other lookup methods

4.    Define Collisions

5.    Open addressing:

§  Define and trace operation of 3 kinds (Practice the following operations using an example with an array.)

        1. linear probing
        2. quadratic probing
        3. doubling hashing

8.    Separate chaining

§  Define and trace operations