Data Structures and Algorithms

Asymptotic Complexity

f(n) is  O(g(n)) iff there are constants c and n0 such that for all n > n0, |f(n)| < c |g(n)| .

f(n) ~ g(n) iff the limit as n gets big of |f(n)| / |g(n| is 1.

Application Program Interface (API)

1 Basic Search

2 Lists

2.1 Bags

2.2 Queues

2.3 Stacks

2.4 Deques

3 Sorting

3.1 Comparison Sorts

3.2 Counting Sort

3.3 String Sorts

3.4 Priority Queues

4 Symbol Tables

4.1 (Unordered) Symbol Tables

4.1.1 Integer Tables
4.1.2 Hash Tables
4.1.3 Sets

4.2 Ordered Symbol Tables

4.3 String Symbol Tables

5 Graphs

5.1 Union/Find Data Structures

6 Miscellaneous Utitity Classes

Here is the Javadoc for Java these classes. They classes are also available as a jar file: cmp338.jar (last modified: 12/13/12). To import them into Eclipse:

  1. Download the jar file onto your computer.
  2. Create a new java project, API (say), under Eclipse.
  3. Click the API project folder.
  4. From the File menu, select Import....
  5. In the Import popup, select General ~> Archive File, then click Next.
  6. Use the Browse... button, to put the path to the just downloaded cmp338.jar file in the From archive file: field.
  7. Move the edufolder under the src folder.