1. Suppose we start looking in the keys array at some index—say, 34—and we move forward until we find a null key. Perhaps this first null key is at index 36. If hasBeenUsed[36] is false, then that...


1. Suppose we start looking in the keys array at some index—say, 34—and we move forward until we find a null key. Perhaps this first null key is at index 36. If hasBeenUsed[36] is false, then that indicates that the location has never been used, and therefore no element with the given key appears in the table (since it would have been placed in this unused location or perhaps in location 34 or 35, which we have already examined).


On the other hand, if hasBeenUsed[36] is true, then this location has previously been used and since removed. In this case, it is possible that there is an element with the given key in the table at a location after 36. It might be after this location because, at the time it was added, location 36 might have been in use.





Dec 09, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here