Question: A public put method which takes a key parameter ( string ) , then a list of fields parameter ( list of objects ) .
A public put method which takes a key parameter string then a list of fields parameter list of objects
If the degree of the given row doesnt match the degree field of the table, throw an illegal argument exception.
Create a new row composed of the key parameter and an unmodifiable view of the list of fields parameter.
Use your hash function and linear probing to find an old row with the given key.
On a miss, set the new row at the probed index, increase the size by update the fingerprint, then return null.
On a hit, replace the old row at the probed index with the new row, update the fingerprint, then return the old list of fields.
On an unexpected fallthrough when linear probing because the array is full, throw an illegal state exception.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
