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
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
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
Merge
Sort
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
Understand
the summary table of sorting algorithms
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.)
8.
Separate
chaining
§ Define and trace
operations