Computer Science 210
Data Structures
Fall 2018, Siena College
Class Examples
Class examples will be linked below. Please report any missing examples.
- Introduction
-
- Late - Late penalty calculator
- Java Review
-
- 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)
- Matrix2D - a two-dimensional matrix class with
some basic methods
- SpellsArrays - an example of two associated "parallel" arrays
- SpellsArrayGenericPair - replace the parallel arrays with an arrey of GenericPair objects
- SpellsArrayAssociation - replace the GenericPair with an Association
- ArrayLists
-
- 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
- Searching and Sorting
-
- Linked Structures
-
- RatioListApplet - a recursive data structure to hold Ratio objects (need to run with Appletviewer on the provided view.html file)
- 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
- BTTraversals - recursive traversals and iterators
over binary trees
- Maps and Hashing
-