Assignment 9 - Data Structures 2

Setup

Download the zip file Data Structures.zip and expand out Test05.java, dictionary.txt, and dracula.txt.

Experiments

Run the Java program with the following data types:

  • HashSet
  • LinkedList
  • TreeSet
  • ArrayList
  • Stack

Results

Present and explain the following:

  • What does the program do?
  • Why does the program read the whole story into memory before spell-checking?
  • What are the timings of the different data structures?
  • Why are those data structures timed the way they are? Make sure you go back to your data structures days, and explain how the data structure is impacting the performance. Show you understand how the data structures work.
  • What is the difference between a Set and a Map?