Answered step by step
Verified Expert Solution
Question
1 Approved Answer
If the degree of the given row doesn t match the degree field of the table, throw an illegal argument exception. 2 Create a new
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.
Linear search the array to find an old row with the given key.
On a hit, replace the old row at its index within the filled region with the new row, then return the old list of fields.
On a miss, append the new row to the filled region, increase the size by then return null.
Before returning from a miss, if the size equals the capacity, dynamically expand the array.
i Double the capacity field, keeping it a power of
ii Reassign the array field to reference a copy of itself with a length equal to the new capacity.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started