BucketingLab

BucketingLab - 15-121: Introduction to Data StructuresFall

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 15-121: Introduction to Data StructuresFall 2009Exercise10/15/2009Bucketing LabDue: Fri, Oct 1611am YOU ARE ENCOURAGED TO WORK ON THIS LAB IN PAIRS. Turn in only one paper with both names on it.Assignment: (worth 5 exercise points) Get the file BucketLab.zip1)Look at the Question1 class. In it, there is an array of numbers that are put into buckets and "re-collected up" a number of times. Look through this file to understand what it is doing. Trace it to see what it does.a) TASK: In the processByDigitmethod, there are two commented lines telling you to draw pictures. // TASK for Question 1: SHOW PICTURE OF BUCKETS HERE// TASK for Question 1: SHOW PICTURE OF ARRAY NOWDraw these pictures on paper. Be sure to draw them in order and label them.b) In the processByDigit method, each bucket was represented as a HashSet. What will happen if we change the program so that each bucket is represented as an ArrayList? Change lines 33 and 35 so that each is an ArrayList and re-do part a by drawing the appropriate pictures.that each is an ArrayList and re-do part a by drawing the appropriate pictures....
View Full Document

Page1 / 2

BucketingLab - 15-121: Introduction to Data StructuresFall

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online