[Cs3] Lab 8 Confusion

Jordan Adamek jadamek2 at kent.edu
Wed Oct 22 15:30:16 EDT 2014


Hello everyone,

There was quite a bit of confusion over the requirement for Lab 8, so I
figured I will try and explain it here:

-The current increment() function simply goes to the next item in a given
bucket, or the next bucket if we are at the end of the current bucket.
This, in no way, guarantees any order within the key space. You need to
modify increment and decrement such that they traverse the hash map in
key-order; i.e:

A hash map is given the key-value pairs: <1, "hi"> <4, "no"> <103, "why">

The actual container may look something like:

mElems[
   0 = {<1, "hi">}
   ...
   2 = {<103, "why">}
   ...
   4 = [<4, "no">}
   ...
]

So the current iterator, used in a simple for-loop for printing, would
display:

1, hi
103, why
4, no

Your implementation needs to display:

1, hi
4, no
103, why

You *cannot* change the actual bucket placement of any element for sorting
purposes. Your in/decrement should be *const* safe: it should not modify
the hash map.

Given the confusion, I will allot *one* day extra for this; the Lab is
due *Friday
11:59 PM*, and will not be accepted for credit beyond that.



Good luck!
-- 

Jordan Adamek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://listmail.cs.kent.edu/pipermail/cs3/attachments/20141022/37efb967/attachment.html 


More information about the cs3 mailing list