Introduction to Computer Science II, ICS 211
This page is
http://www2.hawaii.edu/~esb/2021spring.ics211/index.html
This page is subject to change without notice -- please reload it
in your browser if an item that might affect you may have changed.
The organization of the course is described here. Please review it at the beginning
of the course and occasionally during the course. It includes
information about course goals, class time and location, contacting the
instructor
, the textbook, grading, and the no cheating policy. I also have
some suggestions for doing well in this course.
If you have any questions, please contact the instructor.
Schedule
This schedule is subject to change.
The class is scheduled Tuesdays and Thursdays 9am-10:15am on zoom .
The instructor's office hours are 2-3pm TR, also on Zoom and on Discord.
-- see here for details. Details of the zoom and
discord information are available in the resources on Laulima.
I usually post the presentation notes no later than the
day before the lecture.
Chapter references are to the textbook, Data Structures: Abstraction
and Design Using Java, 3rd edition.
- Tue, Jan 12. Course introductions, course summary.
Presentation
- introductions
- course overview
Some links for this class:
homework 1 assigned, due January 19th, 11:55pm.
- Thu, Jan 14. Java Basics Review. Appendix A in the book.
Presentation
- basics
- exceptions
- variables
- arrays
- modulo operator
- if statements, booleans, comparisons
- loops: while and for
Some links for this class:
- Tue, Jan 19. Java Objects Review. Interfaces, super- and
sub-classing, object-oriented programming, Java classes and objects,
wrappers, exceptions. Sections 1.1-1.8, A6, A12 in the book.
Presentation
- Abstract Data Types (ADTs)
- Java Interfaces
- Class hierarchy and inheritance
Some links for this class:
homework 2 assigned, due January 22nd, 11:55pm.
- Thu, Jan 21. Algorithm efficiency and Big-O notation. Section 2.4 in the book.
Presentation
- Class hierarchy and inheritance
- Method overriding or overloading, polymorphism
- Abstract classes
- Casting and instanceof/getClass
- Class Object
- Exception class hierarchy
Some links for this class:
homework 3 assigned, due January 29th, 11:55pm.
- Tue, Jan 26. Selection Sort. Bubble sort. Insertion Sort. Introduction to Algorithm Analysis. Section 2.4 and Sections 8-8.4 in the book.
Presentation
- equality and comparisons in Java
- sorting
- selection sort
- bubble sort
- insertion sort
- introduction to algorithm analysis
Some links for this class:
- Thu, Jan 28. Algorithm Analysis and Big-O Notation. Sections 2.4 and 8.5 in the book.
Presentation
- algorithm analysis
- Big-O notation
- figuring out big-O for sorting algorithms
homework 4 assigned, due February 5th, 11:55pm.
- Tue, Feb 2. List interface. Array lists. Sections 2.1-2.3 in the book.
Presentation
- Big-O analysis in practice
- List interface
- Array lists
Some links for this class:
- Thu, Feb 4. Analysis and implementation of array lists.
Presentation
- Array list implementation
- Big-O Analysis of array list efficiency
Note that
invariants are not in the book.
homework 5 assigned, due February 12th, 11:55pm.
- Tue, Feb 9. Linked lists, with analysis and implementation. Section 2.5 in the book.
Presentation
- Linked List implementation
- Big-O Analysis of array list efficiency
Some links for this class:
- Thu, Feb 11. Doubly-linked lists. Sections 2.6 and 2.8 in the book.
Iterators. Section 2.7 in the book.
Presentation
- reminder of invariants and circular lists
- doubly-linked lists
- iterators
- the Java foreach statement
- iterator implementation
- the ListIterator interface
Some links for this class:
homework 6 assigned, due February 19th, 11:55pm.
- Tue, Feb 16. Iterators. Section 2.7 in the book.
Presentation
- iterators
- the Java foreach statement
- iterator implementation
- the ListIterator interface
Some links for this class:
- Thu, Feb 18. Collection interface, testing. Sections 2.9-2.11 in the book.
Presentation
- the Java Collection interface
- testing
- errors
- reasoning about programs
- Tue, Feb 23. Exam review.
Presentation
- Java review
- Interfaces
- Class Hierarchy, Abstract Classes, Inheritance
- Selection sort, Bubble sort, Insertion sort
- Invariants
- Lists
- ArrayList
- LinkedList
- runtime analysis
- Iterators
- Java references
- Thu, Feb 25. Midterm exam 1.
homework 7 assigned, due March 5th, 11:55pm.
- Tue, Mar 2. Stacks. Sections 3.1-3.3 in the book.
Presentation
- errors
- reasoning about programs
- stacks
- stack ADT
- Tue, Mar 4. Stacks and stack applications. Sections 3.1-3.4 in the book.
Presentation
- stack ADT
- method signatures
- array stack implementation
- linked stack implementation
- stack applications
- infix, prefix, and postfix expressions
- StringBuilder
Some links for this class:
homework 8 assigned, due March 12th, 11:55pm.
- Tue, Mar 9. Queues. Sections 4.1-4.3 in the book.
Presentation
- infix, prefix, and postfix expressions
- StringBuilder
- queues
- queue interface
- queue applications
- queue implementation: array queue
Some links for this class:
- Thu, Mar 11. Queue applications. Section 4.5 in the book.
Presentation
- queue implementation: linked queue
- application of queues and stacks: data structure traversal
- application of queues: simulation of an airline counter
- random numbers
- recursion
- examples of recursion
Some links for this class:
homework 9 assigned, due March 26th, 11:55pm.
- Tue, Mar 23. Recursion. Sections 5-5.3 in the book.
Presentation
- examples of recursion
- principles of recursion
- binary search
- Thu, Mar 25. Recursion. Sections 5.4-5.6 in the book.
Presentation
- binary search
- recursive printing of integers.
Some links for this class:
- Tue, Mar 30. Exam review.
Presentation
- exam review
- recursion
- binary search
- stacks
- queues
- infix, prefix, and postfix expressions
- random numbers
- runtime analysis
- Thu, Apr 1. Midterm exam 2, on Chapters 3, 4 and 5.
- Tue, Apr 6. Trees and implementation of trees. Sections 6.1 and 6.3 in the book.
Presentation
- trees
- binary search trees
- tree traversal
homework 10 assigned, due April 9th, 11:55pm.
- Thu, Apr 8. Tree traversals. Section 6.2 in the book. Binary Search Trees. Section 6.4 in the book.
Presentation
- binary search tree algorithms: add, remove, traverse
- binary node class
Some links for this class:
- Tue, Apr 13. Huffman Trees.
Presentation
- Huffman trees
- Huffman coding
- implementation of Huffman coding
homework 11 assigned, due April 16th, 11:55pm.
- Thu, Apr 15. Heaps and priority queues. Section 6.5 in the book.
Presentation
- review of lambda expressions (from ICS 111)
- heaps
- heap storage in arrays
- heap insertion and removal
- priority queues
- Tue, Apr 20. Hash tables. Sections 7-7.3 in the book.
Presentation
- hash tables
- hash functions
- open addressing
- chained hashing
Some links for this class:
- two hash functions: from 2006 and from 2011.
homework 12 assigned, due April 30th, 11:55pm.
- Thu, Apr 22. Implementation of hash tables. Section 7.4 in the book. Reminder of sorting and quadratic sorting algorithms.
Presentation
- open addressing
- chained hashing
- applications of hashing
- reminder: equality and comparisons in Java
- reminder: sorting
- reminder: selection sort
- reminder: bubble sort
- reminder: insertion sort
Some links for this class:
- Tue, Apr 27. Shell Sort, Merge sort. Sections 8.6-8.7 in the book.
Presentation
- reminder: equality and comparisons in Java
- reminder: sorting
- reminder: selection sort
- reminder: bubble sort
- reminder: insertion sort
- Shell sort
- merge sort
Some links for this class:
- Thu, Apr 29. Heap sort, Quick sort. Sections 8.8-8.10 in the book.
Presentation
- merge sort
- heap sort
- quick sort
Some links for this class:
- Tue, May 4. Course review.
Presentation
- exam 1 material: Java, ADTs, linked lists, run-time big-O, objects, references and pointers, iterators, invariants
- exam 2 material: generic types and container classes, stacks, queues, recursion, binary search
- binary trees, binary search trees, tree traversal, heaps, huffman coding, priority queues, hashing,
- sorting: insertion, selection, bubble, mergesort, heapsort, quicksort
The final exam for this class is scheduled for Tuesday May 11th, from 9:45am to 11:45am. The exam is on the material in the entire course, with some emphasis on the material since exam 2.
Anyone wishing to take the final exam early please contact the instructor before May 5th.