Computer Science 210
Data Structures
Fall 2019, Siena College
Class Examples
Class examples will be linked below. Please report any missing examples.
- Introduction
-
- Late - Late penalty calculator
- Java Review
-
- ArrayLists
-
- General Purpose Classes
-
- DoublePair - a general purpose class that holds a pair of double values
- ObjectPair - a general purpose class that holds a pair of Object values
- GenericPair - a generic pair class using Java generics (type parameters)
- SpellsArrayGenericPair - replace the parallel arrays with an arrey of GenericPair objects
- Complexity and Asymptotic Analysis
-
- Recursive Methods
-
- Sum1ToNRec - a recursive method to compute a
mathematical formula
- Powers - compute powers (base raised to an
exponent) iteratively and recursively
- Linked Structures
-
- RatioListApplet - a recursive data structure to
hold Ratio objects (need to run with Appletviewer on the
provided view.html file, but that might not work in modern Java
installations)
- SimpleLinkedList - a singly linked list implementation
- Trees
-
- BinaryExprTree - "custom class" version of a binary tree to represent an expression tree for an arithmetic expression
- BinaryExpressionTree - sample usage of a generic binary tree
- BinSearch - binary search on ints and Comparables
- Maps and Hashing
-