Using the ADT dictionary operations, write pseudocode for a replacefunctionat the client level that replaces the dictionary entry whose search key is x with another entry whose search key is also x.
What will be an ideal response?
```
//Replaces in the dictionary aDictionarythe item whose search key matchessearchKey
//withreplacementItem, whose search key also matches searchKey.
//If the operation is successful, returns true, otherwise returns false.
replace(aDictionary: Dictionary, searchKey:KeyType,
replacementItem: ItemType): boolean
{
result = aDictionary.remove(searchKey)
if (result)
result = aDictionary.add(searchKey, replacementItem)
return result
}
```
You might also like to view...
________ allows a user to decide if a document that was downloaded from the Internet is safe before working with it
A) Protected View B) Print Preview C) Page Layout view D) Live Preview
The ________ data type inserts a unique, numeric value when a new record is entered
A) Currency B) Number C) AutoNumber D) Calculated