Koofers

Past Exam for CP SC 212 - ALGS/DATA STRUCTURES at Clemson (Clemson)

Exam Information

Material Type:Exam 2
Professor:Staff
Class:CP SC 212 - ALGS/DATA STRUCTURES
Subject:COMPUTER SCIENCE
University:Clemson University
Term:Fall 2006
Keywords:
  • Unauthorized
  • Program Evaluation
  • Provided That
  • Unauthorized Assistance
  • The Message
  • Correctness
  • Error Message
  • Constructor
  • Hash Function
  • Public String
Login / Sign Up to View Document
Preview Page 1Preview Page 2

Sample Document Text

CPSC 212-301 Test #2A\n\nName: _____________________________ October 23, 2006\n\nHonor Pledge: I pledge that I have neither given nor received unauthorized assistance on this test. Signed: _______________________ Date: _____________\n20 points. 50 minutes. Open Java API. Open cucs API. You may not visit any other web page. You are to develop a class called MyHashTable with one constructor:\npublic MyHashTable (int n) { // ... your code ... } // MyHashTable\n\nwhich receives an int variable x which specifies the length (number of elements) of the hash table, and three public methods:\npublic void insert (int x) { // … inserts x into hash table } // insert public String toString () { // ... your code ... } // toString\n\nThe method insert(int x) inserts the value x into the hash table. Use f(x)=x%n where n is the length of the hash table, as the primary hash function. Use double hashing to handle collisions; use the double hashing function: h2(x)=11–(x%11). If you cannot insert the value in the hash table, ...

Related Documents

Unauthorized Exam
Root Element Exam
Program Evaluation Exam
Unauthorized Exam
Program Evaluation Exam
Alpha Testing Exam
Alpha Testing Exam
Program Evaluation Exam
Unauthorized Exam
Integer Index Value Exam
Unauthorized Exam
Alpha Testing Exam
Javascript Program Exam
Javascript Program Exam
Javascript Program Exam
Union Operations Exam
155, "/var/app/current/tmp/"