/** ****************************************************************************** * HOMEWORK 1, 15-211 ****************************************************************************** * This is an implementation of a hash table structure using quadratic probing. * * * @author * @date *****************************************************************************/ import java.util.*; public class QuadraticProbingHashSet implements HashSetInterface { public static final int DEFAULT_SIZE = 7; /* Implement the HashSetInterface */ /* Include the main() for testing and debugging */ /* public static void main(String[] args) { QuadraticProbingHashSet ht = new QuadraticProbingHashSet(); String[] people = {"Tom", "Jay", "Pat", "Mark", "Tom", "Victor", "Dan", "John", "Jim", "Tim", "Ryan", "Joel", "Sam", "Don"}; // insert the people into the hash set for (int i = 0; i < people.length; i++) { ht.add(people[i]); } System.out.println(ht); System.out.println(ht.contains("Pat")); ht.remove("Pat"); System.out.println(ht.contains("Pat")); System.out.println(ht); for (int i = 0; i < people.length-1; i++) { System.out.println(ht.size()); ht.remove(people[i]); } System.out.println(ht); System.out.println(ht.contains("Ryan")); ht.add("Pat"); System.out.println(ht); } */ }