Question: Prompt: After reading instructions, complete required steps: Your task is to implement a linked dictionary, which will store key - value pairs in a linked
Prompt:
After reading instructions, complete required steps: Your task is to implement a linked dictionary, which will store keyvalue pairs in a linked list.
Your linked dictionary should support the following operations:
addkey value: Adds a new keyvalue pair to the linked dictionary. If the key already exists, the corresponding value should be updated.
getkey: Returns the value associated with the given key, or None if the key does not exist.
deletekey: Deletes the keyvalue pair with the given key from the linked dictionary.
You should implement the linked dictionary using the class LinkedDict.
The linked dictionary should store its elements in a linked list.
Implement the linked list using a separate class Node.
Do not use any builtin data structures in Python, such as dictionaries, lists, or sets.
Write test cases for each method to ensure that the code is working as expected.
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
