Exam 2
The focus of Exam 2 is on Java programming; evaluating
expressions, knowing type of an expression, tracing through code,
problem solving and writing code (adding methods to classes, writing
code fragments, and writing whole classes).
You may want review
Some Tips for Taking CS21 Exams.
Exam 2 Topics
The topics that will be covered on the exam are:
- sorting and searching arrays
- know linear and binary search
- given a description of a sorting algorithm, you should be able
to implement it
- arrays of objects including sorting and searching (using compareTo method)
- objects with array data members
- keeping track of type is important
- init array data member in constructor
- provide accessor/modifier methods to array bucket values
- linked lists
- creating
- inserting at head, inserting at tail
- traversing a linked list (to print out elms, for example)
- inserting in sorted order
- searching for a matching element
- searching for all matching elements
- complexity analysis (big-O, # steps of algorithm in terms of size n)
know how to figure out the complexity of algorithms that
we discussed in class. for example:
- insert into array, linked-list, BST
- sorting an array, linked-list
- searching for elm in an array, a linked-list, a BST
- etc.
- binary search trees
- trace through code BST code
- write BST code given a partial implementation of a BST and BSTNode